File tests.unit.volume.v2.fakes is modified to provide sdk volume fakes.
File tests.unit.compute.v2.fakes is modified to provide sdk volume
attachment fakes. For test, setup_sdk_volumes_mock() method is created
so that volumes are created in similar way as servers are created.
Change-Id: I290ba83b6ba27a1377ab73fd0ae06ecced25efd1
The old novaclient.v2.server.Server.interface_attach() method is
replaced with proxy.create_server_interface().
In swargs, 'net_id' and 'port_id' are mutual-exclusive, if one of
them is given with value, the other one cannot be None, as the
API would responde with 400 (None is not string).
In unit test, temporary method 'setup_sdk_servers_mock' is added,
because other tests are still using the old 'setup_servers_mock'.
Functional tests are added. Releasenote is generated.
Change-Id: I9899f0509febc5143560a1859ae6344d0a6d1427
The API behind the 'server add volume' command returns details of the
created volume attachment, however, we were dropping these results
rather than displaying them to the user. Correct this.
Change-Id: I3f7e121220d29422ccf4e6940de2f28bb8496c83
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Switch this command from novaclient to SDK. As this is the first command
related to server that we are migrating, we need to extend our test
fakes to support fake Server resources. The extended fakes will replace
the old ones once all commands related to server are switched.
Change-Id: If476fb1614a64320ed071bbda35e941bf3290a2e
The nova API expects the 'tags' and 'not-tags' filters of the 'GET
/servers' (list servers) API to be a CSV string [1]:
tags (Optional)
A list of tags to filter the server list by. Servers that match all
tags in this list will be returned. Boolean expression in this case
is 't1 AND t2'. Tags in query must be separated by comma.
New in version 2.26
not-tags (Optional)
A list of tags to filter the server list by. Servers that don’t
match all tags in this list will be returned. Boolean expression in
this case is 'NOT (t1 AND t2)'. Tags in query must be separated by
comma.
New in version 2.26
We were instead providing a Python list, which was simply being URL
encoded. Correct this.
[1] https://docs.openstack.org/api-ref/compute/?expanded=list-servers-detail#list-servers
Change-Id: Ie0251a0dccdf3385089e5bbaedf646a5e928cc48
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1946816
this already exists for server rebuild, but was missing for server
create.
This option is supported from Compute API version >= 2.63, and is only
available for servers booted directly from images (not from volumes,
not from snapshots, and not from images first converted to volumes).
Additionally, this patch removes mentions of
OS_TRUSTED_IMAGE_CERTIFICATE_IDS env var from similar option help string
in server rebuild command as it is not actually implemented yet.
Change-Id: I4e9faea05c499bd91034d1d284c44fdcc8e18db5
Add file to the reno documentation build to show release notes for
stable/xena.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.
Sem-Ver: feature
Change-Id: Iedf2c908bf5a9d87effa02717eb604ee8d15ef3b
This microversion drops the duplicate ``id`` field while adding
``attachment_id`` and ``bdm_uuid`` to the output of the
os-volume_attachments API reflected within osc by the ``openstack server
volume list $server``command.
Depends-On: https://review.opendev.org/c/openstack/nova/+/804275
Change-Id: I8a7002d8d65d7795e106b768df868198ab8b8143
Allow configuring hostname when creating a new server or updating or
rebuilding an existing server.
Change-Id: Ibe603eab78bbbec43605f56de62a20493b6aa93d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/python-novaclient/+/806917
Currently, the unified client does not have the ability to show the
"Forced Down" field of a GET /os-services response in microversion 2.11
even though the legacy client can.
This adds a "Forced Down" column to the 'openstack compute service list
--long' command output when microversion 2.11 is used.
Story: 2009115
Task: 43011
Change-Id: I10bc2fedbf0e867a990227962b2b6e60f5681f69
This closes a gap with cinderclient's 'transfer-create' command.
Change-Id: I7386a7be15c0e3ee87abbcfc2275ba8524c10ff8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2009054
Task: 42831
There is no 'volume group unset' command nor any need for one right now.
This was mistakenly added in I3b2c0cb92b8a53cc1c0cefa3313b80f59c9e5835.
Change-Id: I9386d1350099b10659c6b0e632e4d83cae5b2bfd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add an additional '--no-property' option to the 'volume backup set'
command, along with a brand spanking new 'volume backup unset' command.
Change-Id: Id7ca925e0ada03e259f0ecaf3e02af11c900641e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These mirror the 'cinder group-snapshot-*' commands, with arguments
copied across essentially verbatim. The only significant departure is
the replacement of "tenant" terminology with "project".
volume group snapshot create
volume group snapshot delete
volume group snapshot list
volume group snapshot show
Change-Id: Ia5084749b7c1a5a936fd6d6e8d89b9b80969f68c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Neutron has got CRUD API for L3 conntrack helper since some time.
This patch adds support for it in the OSC.
OpenStack SDK supports that since [1]
This patch also bumps minimum OpenStack SDK version to
the 0.56.0 as that version introduced support for the
Neutron's L3 conntrack helper.
[1] https://review.opendev.org/c/openstack/openstacksdk/+/782870
Change-Id: I55604182ae50b6ad70c8bc1f7efad8859f191269
These mirror the 'cinder group-type-*' commands, with arguments copied
across essentially verbatim. The only significant departure is the
merging of some commands, such as 'group-type-default' and
'group-type-list' into 'group type list', and 'group-type-update' and
'group-type-key' into 'group type set/unset'.
volume group type create
volume group type delete
volume group type list
volume group type show
volume group type set
volume group type unset
Change-Id: Iee6ee2f1f276e6ef6f75a74f8f2980f14c0d5e2f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
These mirror the 'cinder group-*' commands, with arguments copied across
essentially verbatim. The only significant departures are the
replacement of "tenant" terminology with "project" and the merging of
the various volume group replication action commands into the parent
volume group (e.g. 'openstack volume group set --enable-replication'
instead of 'cinder group enable-replication')
volume group create
volume group delete
volume group list
volume group show
volume group set
volume group failover
Change-Id: I3b2c0cb92b8a53cc1c0cefa3313b80f59c9e5835
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add a couple of missing options to each command:
volume backup create
--no-incremental
--property
--availability-zone
volume backup set
--property
Most of these are version dependent so we add the relevant version
checks as part of this work. While we're here, we also make the
formatting a little easier on the eye in places.
Change-Id: I328d5c981cb32b2ee9a4b1bd43aa36b22347ff63
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This patch implements the necessary commands to utilize the Messages API
introduced in Cinder API version 3.3. Version 3.5 built upon this by
implementing pagination support for these commands which is present in
this patch as well.
volume message get
volume message list
volume message delete
Change-Id: I64aa0b4a8d4468baa8c63e5e30ee31de68df999d
These mirror the 'cinder attachment-*' commands, with arguments copied
across essentially verbatim. The only significant departure is the
replacement of "tenant" terminology with "project".
volume attachment create
volume attachment delete
volume attachment list
volume attachment complete
volume attachment set
volume attachment show
Full support for filtering is deferred for now since that's a more
complicated change that requires additional commands be added first.
TODOs are included to this effect.
Change-Id: If47c2b56fe65ee2cee07c000d6ae3688d5ef3b42
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Add file to the reno documentation build to show release notes for
stable/wallaby.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.
Sem-Ver: feature
Change-Id: I848e21bf2d2ea1a1a132525070e5f20d7ff8478d
The neutron API supports filtering subnets by subnet
pool id, but the CLI was missing support for it.
Change-Id: Ic230c2c5cda8255d8f2c422880aeac81670b2df3