Commit graph

3578 commits

Author SHA1 Message Date
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
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
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
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
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
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
Stephen Finucane
d3bd0146ae compute: Add support for loading BDMs from files
The syntax of the '--block-device' parameter is complex and easily
screwed up. Allow users to load a block device config from a file. For
example:

  $ openstack server create ... --block-device file:///tmp/bdm.json ...

This should alleviate the pain that is BDMv2 somewhat.

No functional tests are provided since we already have tests for the CSV
style of passing parameters and the unit tests show that the net result
is the same.

Change-Id: I3e3299bbdbbb343863b4c14fb4d9196ff3e1698d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-05 13:11:09 +00:00
Stephen Finucane
7c1d6f769c compute: Add functional tests for --block-device
This mostly reuses the existing tests for '--block-device-mapping',
which can hopefully be removed at some point in the future.

This highlights two issues with the implementation of this option.
Firstly, the 'boot_index' parameter is not required so don't mandate it.
Secondly, and more significantly, we were defaulting the destination
type for the 'image' source type to 'local'. Nova only allows you to
attach a single image to local mapping [1], which means this default
would only make sense if you were expecting users to use the
'--block-device' option exclusively and omit the '--image' option. This
is the *less common* case so this is a bad default. Default instead to a
destination type of 'volume' like everything else, and require users
specifying '--block-device' alone to pass 'destination_type=local'
explicitly.

[1] https://github.com/openstack/nova/blob/c8a6f8d2e/nova/block_device.py#L193-L206

Change-Id: I1718be965f57c3bbdb8a14f3cfac967dd4c55b4d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-05 12:44:52 +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
d94d2f1213 Merge "compute: Remove references to optional extensions" 2021-03-04 21:28:31 +00:00
Zuul
93c9b914a6 Merge "compute: Add missing 'server create' options" 2021-03-04 21:28:13 +00:00
Zuul
433ceff051 Merge "compute: Improve 'server create --block-device-mapping' option parsing" 2021-03-04 21:27:44 +00:00
Zuul
1f6104c760 Merge "compute: Rename 'server migrate (confirm|revert)'" 2021-03-04 16:51:57 +00:00
Zuul
855dc79a87 Merge "compute: Add 'server migration show' command" 2021-03-04 16:51:40 +00:00
Zuul
82770fa6c0 Merge "Rename FakeServerMigration to FakeMigration" 2021-03-04 16:51:12 +00:00
Zuul
e8a50692a0 Merge "compute: Add support for 'server boot --nic ...,tag=<tag>'" 2021-03-04 16:50:58 +00:00
Zuul
af18b514ef Merge "compute: Improve 'server create --nic' option parsing" 2021-03-04 13:21:31 +00:00
Zuul
b9f61f7b30 Merge "compute: Shuffle options for 'server create'" 2021-03-04 13:21:10 +00:00
Zuul
d4f8aa163d Merge "compute: Add missing options for 'server event list'" 2021-03-04 13:20:35 +00:00
Zuul
1c84b44ac2 Merge "Add --name to port list" 2021-03-03 17:03:02 +00:00
Zuul
2732ed3fe0 Merge "compute: Add missing options for 'server group list'" 2021-03-03 17:01:52 +00:00
Zuul
011991bcf3 Merge "compute: Add 'server * --all-projects' option" 2021-03-03 17:01:33 +00:00
Brian Haley
16c72f8642 Add --name to port list
The neutron API supports filtering ports by name, but
the CLI was missing support for it like it does for
other networking resources.

Change-Id: I4ff339e18656013218a26f045b205cb7a02dd2fb
Story: #2008654
2021-02-23 18:58:24 -05:00
Miguel Lavalle
e8509d81ee Add 'address_group' type support to rbac commands
Depends-On: https://review.opendev.org/c/openstack/neutron/+/772460
Change-Id: Icd5e96d180364b979d1e93fcb39f9133a41a06e5
2021-02-10 17:40:39 -06:00
Artem Goncharov
119d2fae25 project cleanup
New implementation of the project cleanup based on the sdk.project_cleanup.
It is implemented as an additional OSC operation and will ideally obsolete the 
`openstack project purge` giving flexibility to extend services support, 
parallelization, filters, etc.

Change-Id: Ie08877f182379f73e5ec5ad4daaf84b3092c829c
2021-02-02 08:14:34 +00:00
Zuul
01a53fa96f Merge "Add device profile to `port`" 2021-01-22 20:42:59 +00:00
Stephen Finucane
70480fa862 compute: Remove deprecated 'server migrate --live' option
It's been long enough. Time to remove this.

Change-Id: I37ef09eca0db9286544a4b0bb33f845311baa9b2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-22 13:00:46 +00:00
Stephen Finucane
6f3969a0c8 compute: Deprecate 'server create --file'
The parameter isn't actually deprecated, since we need to support older
API microversion, however, we now emit an error if someone attempts to
boot a server with the wrong microversion. This would happen server-side
anyway since this parameter was removed entirely in API microversion
2.57.

Change-Id: I73864ccbf5bf181fecf505ca168c1a35a8b0af3a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-22 13:00:46 +00:00
Stephen Finucane
8868c77a20 compute: Stop silently ignore --(no-)disk-overcommit
These options are not supported from Nova API microversion 2.25 and
above. This can be a source of confusion. Start warning, with an eye on
erroring out in the future.

Change-Id: I53f27eb3e3c1a84d0d77a1672c008d0e8bb8536f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-22 13:00:46 +00:00
Stephen Finucane
2bdf34dcc3 compute: Auto-configure shared/block live migration
API microversion 2.25 introduced the 'block_migration=auto' value for
the os-migrateLive server action. This is a sensible default that we
should use, allowing users to avoid stating one of the
'--block-migration' or '--shared-migration' parameters explicitly.

While we're here, we take the opportunity to fix up some formatting in
the function, which is really rather messy.

Change-Id: Ieedc77d6dc3d4a3cd93b29672faa97dd4e8c1185
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-22 13:00:46 +00:00
Stephen Finucane
ace4bfb640 compute: Add 'server create --block-device' option
One of the last big gaps with novaclient. As noted in the release note,
the current '--block-device-mapping' format is based on the old BDM v1
format, even though it actually results in BDM v2-style requests to the
server. It's time to replace that.

Change-Id: If4eba38ccfb208ee186b90a0eec95e5fe6cf8415
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-01-22 13:00:39 +00:00