3808 Commits

Author SHA1 Message Date
Zuul
4f35836798 Merge "Make functional Neutron tests running fine on ML2/OVN environments" 2021-06-29 17:13:27 +00: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
779c39f616 Merge "tests: Rename 'FakeType' -> 'FakeVolumeType'" 2021-06-18 18:02:34 +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
Zuul
f873428f2c Merge "volume: Allow more versions" 2021-06-17 13:06:18 +00:00
Stephen Finucane
13de349411 compute: Better help text for 'openstack server set --state'
Manually changing the server state is a potentially dangerous operation
that should only be done under limited circumstances. It's also an
admin-only operation by default. Highlight both points.

Change-Id: Ifd8aec94937764202131ba8caf6b507caa76d7e9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2008549
Task: 41672
2021-06-16 18:09:32 +01:00
Stephen Finucane
280b14abcd compute: Note that '--password' is deployment-specific
Password injection requires either hypervisor-support or an agent
running in the guest that will talk to the metadata service. It can be
disabled for a deployment using the '[api] enable_instance_password'
nova config option. Indicate this, albeit briefly.

Change-Id: Ief94ea07fc7ab6a487af972e8759ca6704d8f085
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-06-16 16:19:36 +01: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
Akihiro Motoki
02d6fe9be6 L3 conntrack helper: Use singular name consistently
We use singular form for delete command argument in all places.
This commit replaces conntrack-helper-ids with a singular form.
The only visible change is a fix for the help message below.

  openstack network l3 conntrack helper delete
      <router>
      <conntrack-helper-ids>
      [<conntrack-helper-ids> ...]

Change-Id: I50bbd9f6199071bb86cbb2f37c45ebda1de58433
2021-06-08 15:28:06 +09: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
5faa9ef805 tests: Rename 'FakeType' -> 'FakeVolumeType'
There are more types than just volume types.

Change-Id: I6af66f966a221437ff79fabcb0b81fd38586fe67
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-06-03 15:52:18 +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
Stephen Finucane
0f28588e48 volume: Allow more versions
Copy the API version checks from the 'openstackclient.compute.client'
module. These will only be necessary until we migrate everything to SDK
but it's very helpful until then.

Change-Id: I2d9c68db5bf891ffa25fd5a7fc9e8953e44b73ab
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-06-03 15:52:18 +01:00
David Caro
eca1fcd65f
Include hosts in aggregate list --long
This makes it easier to get the total list of aggregates and the hosts
belonging to each of them (specially for scripting purposes).

Change-Id: I94833c15075ae655bc11e7c0fc47c0abad5846fc
Signed-off-by: David Caro <me@dcaro.es>
2021-06-03 09:44:39 +02:00
Zuul
82fcf1dbe5 Merge "compute: Update 'server resize --revert', '--confirm' help" 2021-06-02 18:11:46 +00:00
Stephen Finucane
d087952717 compute: Fix typo
Change-Id: I3795142318b63b7c8f836d78a415a2161f61164d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-06-02 12:17:35 +01:00
Slawek Kaplonski
a2375b8787 Make functional Neutron tests running fine on ML2/OVN environments
Devstack recently switched default Neutron's backend from ML2/OVS to
ML2/OVN. As OVN backend has some parity gaps and differences in some
APIs, functional tests job was failing with ML2/OVN as some tests
weren't properly skipped in case of missing some Neutron API extensions.

This patch fixes that by doing some small changes in the functional
tests:
- skip DHCP/L3 agent tests when dhcp/l3 agent scheduler extensions
aren't available,
- skip updating neutron agent as OVN agents don't allows that,
- skip service providers tests when there is no Neutron L3 agent
available,
- skip setting router as distributed as OVN backend don't supports that
router's attribute at all.

Depends-On: https://review.opendev.org/c/openstack/neutron/+/793141
Change-Id: I29a8db202086b0b49fed865409fa8ca244b98439
2021-05-27 10:13:56 +00:00
Zuul
443c311fc2 Merge "Allow to send extra attributes in Neutron related commands" 2021-05-26 19:29:11 +00:00
Slawek Kaplonski
b26b7f3440 Allow to send extra attributes in Neutron related commands
To deprecate and drop support for neutronclient CLI and use only
OSC we need feature parity between OSC and neutronclient.
Last missing piece here is possibility to send in POST/PUT requests
unknown parameters to the Neutron server.
This patch adds such possibility to the OSC.

Change-Id: Iba09297c2be9fb9fa0be1b3dc65755277b79230e
2021-05-26 09:29:15 +02:00
Stephen Finucane
b1a41904c3 compute: Update 'server resize --revert', '--confirm' help
Update the help strings for these two arguments to indicate their
deprecated nature. This was previously flagged via a deprecation warning
but users would only see that if they were to run the command.

Change-Id: I31a5e27ac8bd2625a6073b54a51bf3e8d6126c8c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-05-20 16:58:57 +01:00
Brian Rosmaita
b019a56187 Add check for cinderclient.v2 support
Block Storage API v2 support is being removed from the cinderclient
during the Xena development cycle [0], so add a check to determine
whether the available cinderclient has v2 support.

[0] https://wiki.openstack.org/wiki/CinderXenaPTGSummary#Removing_the_Block_Storage_API_v2

Change-Id: Id54da1704d94526071f500c36a6e38d6d84aa7b8
2021-05-20 09:20:56 -04:00
Cyril Roelandt
3918622968 openstack image create: honor protection/visibility flags
The --protected, --unprotected, --public, --shared, --community,
--private flags were ignored when using --volume.

Change-Id: Id5c05ef7d7bb0a04b9d7a9d821e544e1ff7b3d28
Story: 2008882
2021-05-05 01:26:51 +02:00
Dirk Mueller
e82a05864f Replace assertItemsEqual with assertCountEqual
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277

Change-Id: I0bbffbec8889b8b3067cfe17d258f5cb16624f38
2021-05-03 22:07:39 +02:00
Zuul
782e4d0f97 Merge "Add support for token caching" 2021-04-09 23:29:03 +00:00
Zuul
684be67df9 Merge "volume: Re-add accidentally deleted test" 2021-04-06 21:09:02 +00:00
Zuul
930ca85dcf Merge "Implements hide image" 2021-04-01 17:58:18 +00:00
Zuul
8e3dde03f9 Merge "network: Add support for vnic-type vdpa" 2021-03-31 18:40:32 +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
Zuul
23e7495d44 Merge "Hides prefix_length column in subnet show output" 2021-03-20 05:55:41 +00:00
Zuul
b527ec15a9 Merge "network: Make 'network qos rule create --type' option required" 2021-03-20 05:54:26 +00:00
Zuul
7c6b689fdd Merge "Remove unnecessary test" 2021-03-20 02:27:54 +00:00
James Denton
d769ff4393 Hides prefix_length column in subnet show output
When the openstacksdk is patched to properly support defining prefix
lengths when creating subnets, the resulting subnet show output
reveals a prefix_length column with a value of 'none'. This patch
hides the prefix_length column.

Change-Id: I59dfb0b1585ed624f9d82b3557df2ff5ff9d1b3e
Partial-Bug: 1754062
Depends-On: https://review.openstack.org/#/c/550558/
2021-03-19 18:43:35 +00:00
Stephen Finucane
c58f0277a7 network: Make 'network qos rule create --type' option required
When we create a network qos rule we need specify the type so that we
can call the corresponding API. It's not possible to use the command
without the type so mark it as required. This was already being done
but inline.

Change-Id: I559f884bac198d2c69e800620aef66b200473418
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-19 18:39:08 +00:00
Stephen Finucane
bf97b5f287 volume: Re-add accidentally deleted test
This is essentially a partial revert of change
I94aa7a9824e44f9585ffb45e5e7637b9588539b4, which removed some deprecated
commands like 'openstack snapshot *' in favour of 'openstack volume
snapshot *'. Unfortunately the latter appeared to have no test coverage
and were relying on tests for the former to validate behavior. Re-add
the tests removed back then.

Change-Id: Ib2cd975221034c8997d272d43cfb18acefc319fe
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-19 16:27:13 +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
Stephen Finucane
2ccf7727a6 compute: Remove 'file://' prefix from '--block-device'
There are a couple of other (networking-related) options which accept
paths, none of which insist on a URI-style path. Let's just drop this
bit of complexity before we release the feature.

Change-Id: Ia7f781d82f3f4695b49b55a39abbb6e582cd879c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-11 15:56:59 +00:00
Zuul
ae1f8f888a Merge "compute: Add support for loading BDMs from files" 2021-03-11 12:51:47 +00:00
Zuul
e6b0473b8b Merge "compute: Add functional tests for --block-device" 2021-03-11 12:44:47 +00:00