1037 Commits

Author SHA1 Message Date
Diwei Zhu
fae293dd52 Switch command server remove volume to sdk
Change-Id: If6f6cf93b55a67e767c54de8ce21f25252cf99ca
2021-11-26 16:11:21 +00:00
Zuul
4b3cdaf8b1 Merge "Switch command server add volume to sdk." 2021-11-25 17:46:47 +00:00
Zuul
6fb71af243 Merge "Add --subnet-pool to subnet list" 2021-11-25 17:46:44 +00:00
Diwei Zhu
3078a0a121 Switch command server add volume to sdk.
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
2021-11-22 16:01:29 +00:00
Zuul
8b394e5641 Merge "Switch openstack server add port/network to using sdk." 2021-11-15 16:31:15 +00:00
Diwei Zhu
2183a61147 Switch openstack server add port/network to using sdk.
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
2021-11-14 15:23:36 +00:00
Stephen Finucane
163cb01e46 compute: Return details of attached volumes
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>
2021-11-03 11:57:31 +00:00
Diwei Zhu
57aad01886 Switch server backup to sdk.
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
2021-10-27 09:11:27 +00:00
Stephen Finucane
53debe7fe1 compute: Fix filtering servers by tags
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
2021-10-13 10:30:26 +01:00
Pavlo Shchelokovskyy
28a376bfb0 Add --trusted-image-cert option for server create
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
2021-09-30 19:42:26 +03:00
8ef9280af9 Update master for stable/xena
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
2021-09-22 10:42:16 +00:00
Zuul
3a0571c4df Merge "compute: Add support for microversion 2.90" 2021-09-02 20:15:11 +00:00
Lee Yarwood
51ee17a94d compute: Add support for microversion 2.89
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
2021-09-02 14:35:17 +01:00
Stephen Finucane
8e833a3ed2 compute: Add support for microversion 2.90
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
2021-09-01 13:18:25 +01:00
Zuul
eca51342c3 Merge "volume: Add 'volume transfer request create --(no-)snapshots' option" 2021-08-26 08:03:53 +00:00
melanie witt
12c93c6d5f Show "Forced Down" compute service status with --long
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
2021-08-17 01:34:05 +00:00
Stephen Finucane
a821d6b7c5 volume: Add 'volume transfer request create --(no-)snapshots' option
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
2021-07-13 20:33:35 +01:00
Stephen Finucane
af406f33e3 cinder: Remove redundant command
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>
2021-06-22 18:26:54 +01:00
Zuul
a5039e7764 Merge "volume: Add more missing 'volume backup *' options" 2021-06-21 13:20:28 +00:00
Zuul
3f3d8829ce Merge "volume: Add 'volume group snapshot *' commands" 2021-06-21 13:09:41 +00:00
Zuul
6abfb01895 Merge "volume: Add 'volume group type *' commands" 2021-06-21 13:09:36 +00:00
Zuul
87369984d1 Merge "volume: Add 'volume group *' commands" 2021-06-18 18:05:39 +00:00
Zuul
05b7049316 Merge "volume: Add missing 'volume backup *' options" 2021-06-18 16:56:06 +00:00
Zuul
ae5f3009d5 Merge "volume: Add 'volume message *' commands" 2021-06-18 16:52:05 +00:00
Zuul
673fec4f64 Merge "volume: Add 'volume attachment *' commands" 2021-06-18 16:51:59 +00:00
Stephen Finucane
7f66dfe0e3 volume: Add more missing 'volume backup *' options
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>
2021-06-10 11:21:25 +01:00
Stephen Finucane
34de2d3352 volume: Add 'volume group snapshot *' commands
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>
2021-06-10 11:21:22 +01:00
Slawek Kaplonski
fa8c8d26a7 Add support for Neutron's L3 conntrack helper resource
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
2021-06-07 15:34:30 +02:00
Stephen Finucane
83551d2a0c volume: Add 'volume group type *' commands
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>
2021-06-03 18:00:50 +01:00
Stephen Finucane
4c2e8523a9 volume: Add 'volume group *' commands
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>
2021-06-03 17:58:48 +01:00
Stephen Finucane
524af4a23e volume: Add missing 'volume backup *' options
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>
2021-06-03 15:52:18 +01:00
Stephen Finucane
0eddab36e5 volume: Add 'volume message *' commands
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
2021-06-03 15:52:18 +01:00
Stephen Finucane
6dc94e1fb8 volume: Add 'volume attachment *' commands
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>
2021-06-03 15:52:18 +01:00
Zuul
f48dc562fe Merge "Update master for stable/wallaby" 2021-04-01 18:31:30 +00:00
Zuul
930ca85dcf Merge "Implements hide image" 2021-04-01 17:58:18 +00:00
Valery Tschopp
383289edd8 Implements hide image
openstack image set [--hidden|--unhidden] IMAGE
openstack image list --hidden

Task: 41734
Story: 2008581
Change-Id: Ie84f10c0f7aa2e7b7f78bfadc70132a10673866e
2021-03-25 08:57:31 +01:00
32151b099c Update master for stable/wallaby
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
2021-03-20 09:16:50 +00:00
Sean Mooney
6f82165979 network: Add support for vnic-type vdpa
Extend 'port create' to support vinc-type vdpa as introduced by neutron
in [1].

[1] https://review.opendev.org/c/openstack/neutron/+/760047

Change-Id: I635c5269f4e8fc55f234c98e85fced87b39fce81
2021-03-19 15:19:38 +00:00
Zuul
86bca18b74 Merge "project cleanup" 2021-03-18 08:39:11 +00:00
Brian Haley
e4e9fb594d Add --subnet-pool to subnet list
The neutron API supports filtering subnets by subnet
pool id, but the CLI was missing support for it.

Change-Id: Ic230c2c5cda8255d8f2c422880aeac81670b2df3
2021-03-16 09:35:15 -04:00
Zuul
274d1eeffb Merge "network: Add missing subnet unset --gateway <subnet-id>" 2021-03-06 13:57:27 +00:00
Zuul
9414435607 Merge "Add reno for change Ic3c555226a220efd9b0f27edffccf6c4c95c2747" 2021-03-06 11:41:23 +00:00
Bharat Kunwar
ed731d6cd9 network: Add missing subnet unset --gateway <subnet-id>
Story: 2008695
Task: 42003
Change-Id: I9486a09531b11f27a9ff0d68fd4ad8c68a65cccf
2021-03-05 14:15:20 +00:00
Zuul
a507fb50f8 Merge "compute: Remove deprecated 'server migrate --live' option" 2021-03-04 21:29:55 +00:00
Zuul
979b4832dd Merge "compute: Deprecate 'server create --file'" 2021-03-04 21:29:48 +00:00
Zuul
8e94044710 Merge "compute: Stop silently ignore --(no-)disk-overcommit" 2021-03-04 21:29:38 +00:00
Zuul
9aad6b8f9e Merge "compute: Auto-configure shared/block live migration" 2021-03-04 21:29:26 +00:00
Zuul
e260d43d94 Merge "compute: Add 'server create --block-device' option" 2021-03-04 21:28:59 +00:00
Zuul
93c9b914a6 Merge "compute: Add missing 'server create' options" 2021-03-04 21:28:13 +00:00
Zuul
1f6104c760 Merge "compute: Rename 'server migrate (confirm|revert)'" 2021-03-04 16:51:57 +00:00