2507 Commits

Author SHA1 Message Date
Zuul
837cbfbcdb Merge "quota: Deprecate "force" behavior for network quotas" 2022-11-05 09:24:51 +00:00
Zuul
b0b47472d8 Merge "quota: Fix issues with delete quota command" 2022-11-05 09:24:49 +00:00
Zuul
ae5f20c1ab Merge "tests: Remove unnecessary nesting of volume resources" 2022-11-05 09:10:14 +00:00
Zuul
495e7fa907 Merge "tests: Remove duplicate FakeImagev1Client" 2022-11-05 09:10:11 +00:00
Zuul
841c54229d Merge "tests: Move fake clients to top of file" 2022-11-05 09:09:23 +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
Zuul
351b2b1074 Merge "quota: Simplify logic used to list, show quotas" 2022-10-12 11:14:20 +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
Stephen Finucane
2da4aa99aa quota: Fix issues with delete quota command
We were passing a project object rather than just the ID. Also correct a
typo in the call to delete network quotas.

Change-Id: I2292db7932ec01026f0e54014e3d02218792617a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-10-11 16:41:28 +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
5826802793 Merge "Fix wrong assertion methods" 2022-09-30 12:23:19 +00:00
Zuul
26946d5670 Merge "Add trustor and trustee filtering to trusts list" 2022-09-30 12:23:14 +00:00
Zuul
5043626c80 Merge "config: Also mask non-prefix config" 2022-09-30 12:10:36 +00:00
Zuul
38dda16639 Merge "network: Add tenant project filter for RBAC list" 2022-09-30 12:10:29 +00:00
Zuul
217654e16c Merge "Replace assertItemsEqual with assertCountEqual" 2022-09-30 12:01:19 +00:00
Stephen Finucane
1aaaa6f1d1 tests: Remove unnecessary nesting of volume resources
Change-Id: I210ce7534d161e89115e5cb96e42ab7f27170aa1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 11:42:07 +00:00
Stephen Finucane
d7f431be50 tests: Remove duplicate FakeImagev1Client
I guess this was defined to avoid a circular import. There are easier
ways to do this.

Change-Id: Iab215a53691298413ea9d10def792008ab9edbce
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 11:41:57 +00:00
Stephen Finucane
e2940eea18 tests: Move fake clients to top of file
These are important and they're easier to identify at the top of the
file than nested deep inside.

Change-Id: I1569c855fadfe4cdacf83ee07d08922bf3edefbc
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 11:41:48 +00: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
Stephen Finucane
47e667e71d quota: Simplify logic used to list, show quotas
This is prep work for some changes we're introducing in a later change.

Change-Id: I27a59bc1d57e6815fb166fb99ea2af88f08b68a9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 12:33:29 +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
Takashi Natsume
ff273909da Fix wrong assertion methods
Change-Id: Iebf4840662e87e59a06b56f1b5248728cba03c24
Story: 2010288
Task: 46261
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-09-23 10:49:43 +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
Takashi Natsume
7e5b528e2e Replace assertItemsEqual with assertCountEqual
The assertItemsEqual were replaced with assertCountEqual in
I0bbffbec8889b8b3067cfe17d258f5cb16624f38.
However the following changes add assertItemsEqual after that.

* I1095100efb27b8559412469f0a9d07fc0a3db9d5
* Ic230c2c5cda8255d8f2c422880aeac81670b2df3
* Ica3320242a38901c1180b2b29109c9474366fde0

So Replace assertItemsEqual with assertCountEqual again.

Change-Id: I11ff1748225e434f64dbaf7b88dc80ba28a5e2a0
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-09-19 01:14:50 +00: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
whoami-rajat
1f63034441 compute: Require image when rebuilding a volume-backed server
A volume-backed server will have no image attribute (or rather the image
property will be set to the empty string). As such, if you want to try
rebuild you will need to specify an image [*]. Enforce this.

[*] Before microversion 2.93, this must be the same image. However, we
don't touch on that here. This will be addressed later.

Change-Id: I6842dabd7acb4e3a78f894e55e616625757eb6a4
Story: 2010297
Task: 46290
2022-09-14 11:22:43 +01:00
elajkat
c6065c7a47 Add address-scope to NDP proxy tests
Related-Bug: #1987410
Change-Id: I61df81381803ca289f295ab8d7a8f495bb169447
2022-09-09 09:18:36 +02: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
Violet Kurtz
a9f8133274 Migrate server_groups to the new API
Moved the server_groups to the new API.

Change-Id: Ied7bd6f56e277f0c5efcd5ba028765f9be65050f
2022-08-02 20:39:19 +00:00
ryanKor
62c52f5e61 config: Also mask non-prefix config
The 'config show' command will show information about your current
configuration. When using a 'cloud.yaml' file and the 'OS_CLOUD'
environment variable, the output of this will look like so:

  $ openstack config show
  +---------------------------------------------+----------------------------------+
  | Field                                       | Value                            |
  +---------------------------------------------+----------------------------------+
  | additional_user_agent                       | [('osc-lib', '2.6.0')]           |
  | api_timeout                                 | None                             |
  | auth.auth_url                               | https://example.com:13000        |
  | auth.password                               | <redacted>                       |
  | auth.project_domain_id                      | default                          |
  | auth.project_id                             | c73b7097d07c46f78eb4b4dcfbac5ca8 |
  | auth.project_name                           | test-project                     |
  | auth.user_domain_name                       | example.com                      |
  | auth.username                               | john-doe                         |
  ...

All of the 'auth.'-prefixed values are extracted from the corresponding
entry in the 'clouds.yaml' file. You'll note that the 'auth.password'
value is not shown. Instead, it is masked and replaced with
'<redacted>'.

However, a 'clouds.yaml' file is not the only way to configure these
tools. You can also use old school environment variables. By using an
openrc file from Horizon (or the clouds2env tool [1]), we will set
various 'OS_'-prefixed environment variables. When you use the 'config
show' command with these environment variables set, we will see all of
these values appear in the output *without* an 'auth.' prefix. Scanning
down we will see the password value is not redacted.

  $ openstack config show
  +---------------------------------------------+----------------------------------+
  | Field                                       | Value                            |
  +---------------------------------------------+----------------------------------+
  | additional_user_agent                       | [('osc-lib', '2.6.0')]           |
  | api_timeout                                 | None                             |
  ...
  | password                                    | secret-password                  |
  ...

This will also happen if using tokens. This is obviously incorrect.
These should be masked also. Make it so. This involves enhancing our
fake config generation code to generate config that looks like it came
from environment variables.

Change-Id: I560b928e5e6bcdcd89c409e0678dfc0d0b056c0e
Story: 2008816
Task: 42260
2022-08-01 19:54:44 +09:00
Zuul
b3ae3f5552 Merge "Add support for CRUD operations for QoS minimum packet rate rule" 2022-07-20 14:13:42 +00: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
Stephen Finucane
4776e0a5ae image: Make better use of argparse
Simplify some logic by using a common 'dest' for mutually exclusive
options.

Change-Id: Ie5f3600672953f40be52de51e84717c8912ddaf8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-06-30 11:51:33 +01:00