1114 Commits

Author SHA1 Message Date
Zuul
837cbfbcdb Merge "quota: Deprecate "force" behavior for network quotas" 2022-11-05 09:24:51 +00:00
Zuul
6898bc0ae3 Merge "quota: Deprecate 'quota show --class', 'quota set --class' arguments" 2022-11-05 09:09:19 +00:00
Zuul
1e37c12b16 Merge "quota: Allow showing project-specific quotas" 2022-11-05 09:09:16 +00:00
Zuul
a03b2352d9 Merge "Added "openstack image metadefs namespace list" command" 2022-10-26 11:31:12 +00:00
Zuul
27479104e7 Merge "volume: Volume names are optional" 2022-10-26 10:11:28 +00:00
Areg Grigoryan
a726d84f4b Added "openstack image metadefs namespace list" command
Change-Id: Ibc064566478818bd70e7e6550095d24a05e1bb0e
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/854612
2022-10-26 12:26:10 +03:00
Zuul
ccd9356550 Merge "quota: Add 'quota show --usage' option" 2022-10-12 11:22:09 +00:00
Stephen Finucane
09ff9a0f4c quota: Deprecate "force" behavior for network quotas
In change Idc1b99492d609eb699d0a6bef6cd760458a774f6, we added a
'--check-limit' option to enable "no force" behavior for network quotas.
This was already the default for compute quotas. Provide a path for
harmonizing the behavior of the two options by instead using a
'--no-force' option which will become the eventual default for the
network quotas also.

Change-Id: I25828a3d68e2e900f498e17a0d01fb70be77548e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-10-11 16:52:08 +01:00
Zuul
8be0c641e1 Merge "quota: Add support for detailed volume quotas" 2022-10-07 17:05:55 +00:00
Zuul
eac38feef0 Merge "quota: Add 'quota delete' command" 2022-10-07 16:37:20 +00:00
Zuul
adac63efe1 Merge "Speed up standard flavor list command" 2022-09-30 13:12:00 +00:00
Zuul
bd4e67452e Merge "compute: Only retrieve necessary images" 2022-09-30 12:31:53 +00:00
Zuul
36f58c2ad7 Merge "Add authorization_ttl for identity providers" 2022-09-30 12:31:51 +00:00
Zuul
26946d5670 Merge "Add trustor and trustee filtering to trusts list" 2022-09-30 12:23:14 +00:00
Zuul
38dda16639 Merge "network: Add tenant project filter for RBAC list" 2022-09-30 12:10:29 +00:00
Zuul
db3610b533 Merge "remove unicode prefix from code" 2022-09-30 12:01:24 +00:00
Zuul
46ead4abea Merge "image: Add 'image task list' command" 2022-09-30 11:59:21 +00:00
Zuul
97af1b661e Merge "image: Add 'image task show' commands" 2022-09-30 11:59:18 +00:00
Stephen Finucane
b62021260c quota: Deprecate 'quota show --class', 'quota set --class' arguments
This doesn't do anything special in nova and cinder and is not supported
in neutron. For the 'quota show' command, people should use the
'--default' argument instead.

Change-Id: I0dd38e5cb252a01d5817ed168be040b21b35e348
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 12:40:18 +01:00
Stephen Finucane
00e7019022 quota: Allow showing project-specific quotas
Add '--compute', '--network' and '--volume' options to the 'quota show'
command, along with a default '--all' option, allowing us to restrict
quotas shown to an individual service.

Change-Id: I122b765df01887b8d916ee6567ffb7768fcb4392
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 12:40:18 +01:00
Stephen Finucane
04e68e0d5a quota: Add 'quota show --usage' option
Provide an more sane way to get usage information for a particular
project's quotas. This requires using the 'Lister' command type since
the 'ShowOne' command type only allows for simple key-value pair output.

We also add a note indicating that the '<project>' argument is optional.

Change-Id: Ic7342cf08f024cc690049414c5eef5b9a7594677
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 12:40:15 +01:00
Pavlo Shchelokovskyy
ec8dba29f9 Speed up standard flavor list command
currently this command tries to fetch extra_specs for any flavor
that does not have them (which is quite usual), regardless if the
command was even asked to display them (--long) at all.
This significantly slows down this command as it makes a lot of
unnecessary REST calls, one per each flavor to fetch extra_specs for.

With this patch, client only attempts to fetch flavor extra_specs if
the user actually called the client with --long.

Change-Id: Ia36414d891a41b641d7a9a04f0a1e7d43cfee351
Story: 2010343
Task: 46484
2022-09-30 11:53:00 +01:00
Stephen Finucane
44443f7856 quota: Add support for detailed volume quotas
We were stating that this was not supported. That is not true. Correct
the oversight.

Change-Id: Ib9d9db641a18e142be0a1eccff783e7cccdf2db5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 10:55:47 +01:00
Stephen Finucane
45bec041b2 quota: Add 'quota delete' command
We had previously indicated that people use 'quota set' for unsetting a
project's quotas, however, there was nothing that actually allowed us to
do this. Correct that oversight.

Change-Id: I04057e766b8ccf94bf219972249b68dc2bb796d4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 10:54:11 +01:00
1b0d2dde13 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: Ie570af5ce752d91190ebf6aa3c5ff2329afa36d3
2022-09-23 14:15:52 +00:00
Stephen Finucane
c9d445fc4b image: Add 'image task list' command
This replaces the 'glance task-list' command.

  $ openstack image task list

We also indicate that the 'image task create' command will never be
implemented. This is an admin-only API that isn't really intended to be
used by humans thus it does not need an OSC command implementation.

Change-Id: Id8a943a5443782fc70c0fbf3639f5aa17b9d30af
2022-09-21 10:43:35 +01:00
lsmman
d163a20904 image: Add 'image task show' commands
This replaces and the 'glance task-show' command. For example:

  $ image task show <TASK_ID>

Change-Id: I74cb23e436c373fe238804b903bbeb28f643d5af
2022-09-21 10:34:15 +01:00
Stephen Finucane
3fc585332f volume: Volume names are optional
Who knew?

Change-Id: I1c1a811c0db59250e8a20a87f25c2662bc3ab3e8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-14 13:44:02 +01:00
whoami-rajat
4024bdb393 compute: Add support for microversion 2.93
Add '--reimage-boot-volume' and '--no-reimage-boot-volume parameters'
to the rebuild command to allow rebuilding of volume backed instances.

Change-Id: I4a6e30b2cf12f32202a2d9ef1ced347e1dd139f3
2022-09-14 11:24:10 +01:00
Jan Hartkopf
4d7d7e627e network: Add tenant project filter for RBAC list
Implements a new parser argument "--target-project" to
list RBAC policies for a specific tenant project only.
This uses the already existing server-side query
parameter "target_tenant".

Story: 2009937
Task: 44824
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/834442
Change-Id: I83ff07041a022e8795e3c5550c6a7aabb0c0d8c8
Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
2022-09-06 14:13:10 +02:00
Zuul
7df94c9f82 Merge "Microversion 2.91: Support specifying destination host to unshelve" 2022-09-01 18:15:52 +00:00
Yang JianFeng
b36cd0f4c0 Add router ndp proxy commands
Depends-on: https://review.opendev.org/749036
Change-Id: I77e12cc2dfe4000bd5ae6511878c6591f52d9791
Related-Bug: #1877301
2022-08-26 08:15:43 +08:00
René Ribaud
6e0699c1cf Microversion 2.91: Support specifying destination host to unshelve
This patch adds a new parameter ``--host`` to
``openstack server unshelve`` command. This can help administrators to specify
an ``host`` to unshelve a shelve offloaded server.
And add new parameter ``--no-availability-zone`` to unpin a server availability

These parameters are available in the 2.91 microversion.

Depends-On: https://review.opendev.org/c/openstack/python-novaclient/+/831651
Implements: blueprint unshelve-to-host
Change-Id: I7986adc7563f63bcd4b3caf5eb7bc4329b4e1eca
2022-08-22 15:03:24 +02:00
niuke
dd648dcb5c remove unicode prefix from code
Change-Id: I0b1ca4237de61b70c694f36e1956e71a2a6b39a4
2022-08-15 12:20:20 +08:00
Pavlo Shchelokovskyy
167cf11e82 Add authorization_ttl for identity providers
this is supported since Ussuri (Keystone API version 3.14) but was
lacking from openstackclient.

Change-Id: Ifac818b9a4eff66d9a68455ada1ddfe67cb46b3b
2022-07-13 22:28:07 +03:00
Przemyslaw Szczerbik
6ccbcdde64 Add support for CRUD operations for QoS minimum packet rate rule
Closes-Bug: #1922237
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/810364
See-Also: https://review.opendev.org/785236
Change-Id: Ie7e1eb0575fd37121d5097ecbc318d0769ab3db0
2022-07-01 13:55:41 +00:00
whoami-rajat
9eea28ba59 Fix: create image from volume command
Currently the command ``openstack image create --volume`` calls cinderclient
to upload the volume to image service (glance) but OSC passes ``visibility``
and ``protected`` fields which are only available in microversion 3.1 or
greater. This generates an error if the user is using volume microversion
< 3.1 and wants to create an image from volume.
This patch fixes that by only passing ``visibility`` and ``protected`` fields
when the volume microversion is 3.1 or greater and fail otherwise i.e. the
following 3 cases:
1) visibility/protected argument + mv >= 3.1 = pass
2) visibility/protected argument + mv < 3.1 = fail
3) not visibility/protected argument + any mv = pass

Story: 2010060
Task: 45511
Change-Id: I568a0ea0af8f7f82b16d49a6a1bb0391b99c50dc
2022-06-30 11:15:33 +01:00
Zuul
30622272e3 Merge "volume: Correct output of 'volume attachment create'" 2022-06-27 15:54:20 +00:00
Zuul
ec95b58482 Merge "Refactor "volume backup restore" command" 2022-06-20 15:19:56 +00:00
Zuul
15608a2696 Merge "Add more filter option of columns for server list -c COLUMN" 2022-06-20 15:19:49 +00:00
melanie witt
93578ef85b Add 'Host Status' to 'server list --long' with >= v2.16
Currently, the 'Host Status' field is shown only for 'server show' but
not for 'server list'. The host_status can be helpful for users who are
having issues with servers that show a status of ACTIVE, as it can show
a hint about the compute host status when nova policy is configured to
allow it.

Story: 2009689
Task: 44003

Change-Id: I6209cf52044218b7b32ab2fa5712574f12ba2f5f
2022-05-16 17:55:40 +00:00
Stephen Finucane
045f2e7e06 volume: Correct output of 'volume attachment create'
When adding these, we missed that the underlying cinder library call
actually returns a dictionary and not a Resource-based object. This
requires slightly different handling. Fix this.

Change-Id: Ie065fe4198ae1238830cb619220e856390d4cb6e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-05-16 12:47:39 +01:00
Dmitriy Rabotyagov
5cc6fc2b88 Allow to filter multiple tags for image list
Currently in case of passing `--tag` several times, only last one will
be picked up for the filtering. In the meanwhile Glance allow option to
be repeated multiple times to filter based on the multiple tags.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/789827
Change-Id: I7379d0b0014f0e3d13b02ee5ec6b642a7a5aa7d1
2022-05-16 09:16:52 +01:00
Stephen Finucane
d727a65023 volume: Add 'block storage cluster *' commands
These mirror the 'cinder cluster-*' commands, with arguments copied
across essentially verbatim. The only significant departure is the
replacement of "tenant" terminology with "project".

  block storage cluster list
  block storage cluster set
  block storage cluster show

We used the 'block storage' terminology rather than simply 'volume' to
allow us to start distinguishing between the volume service and a volume
resource.

Change-Id: I9105a9e4a139af4929e3b1f3a6de6c9a53e0b598
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-05-13 11:59:23 +01:00
JIHOJU
10835a1886 Add more filter option of columns for server list -c COLUMN
In order to improve the convenient of use,
columns corresponding to the "--long" option has been added
so that it can be used in the filter.
Currently filterable columns include the following:
'ID', 'Name', 'Status', 'Networks', 'Image', 'Flavor'.

Story: 2009150
Task: 43113
Change-Id: I6760ca5da0e3707d1d746ae5eeec7d9162020d15
2022-04-19 11:17:03 +00:00
Stephen Finucane
725b7de13c compute: Only retrieve necessary images
The Glance API allows us to filter by multiple IDs using the 'in:'
operator. Take advantage of this to speed up listing of server in larger
deployments where image counts in the hundreds (or even thousands) are
not uncommon.

Unfortunately the Nova API does not support something similar for
listing flavors. Boo.

Change-Id: I7d3222d0b0b8bf72b4ff3e429bc49e621b569979
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/837613
2022-04-12 20:41:29 +01:00
Nicolas Belouin
64e4520b2a Add trustor and trustee filtering to trusts list
The keystone API supports filtering trusts by trustor and/or
trustee.

Also adds a shortcut parameter to get trusts with current
user as trustee or trustor.

Signed-off-by: Nicolas Belouin <nicolas.belouin@gandi.net>
Change-Id: I00ed2b68cf8ada214a59f640f4f0a5c9dbc37063
2022-04-12 06:26:18 +00:00
Rodolfo Alonso Hernandez
1c6d396ba3 Allow "--force" flag in quota network commands
This flag allows to set a new Neutron quota resource limit without
checking first the current resource usage. The new limit will be
set anyway. This flag was used only by the compute engine.

Related-Bug: #1953170
Change-Id: I7084f8208b804236ac99e6842db7a45854ce54d7
2022-03-17 02:38:07 +00:00
Huanxuan Ao
de4a69a29f Refactor "volume backup restore" command
Make the positional argument "volume" optional and add a "--force"
option (volume v2 only) to the "volume backup restore" command.

Closes-Bug: #1597189
Change-Id: If944e10158bd18e8331be63e96187a23e23095d7
2022-03-10 12:04:11 +00:00
Stephen Finucane
cffec4517f compute: Allow retrieval of migration by UUID
The nova API doesn't allow you to retrieve migration records by UUID,
only ID. This is confusing. Work around it by listing records and
filtering this list.

Change-Id: I932c9c70420e85056509513e005bb78168e70611
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-03-09 17:31:44 +00:00