5352 Commits

Author SHA1 Message Date
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
1ff839da76 quota: Trivial style fixups
Change-Id: I4522b54676033dced2b47477238ceb551e11d04a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 12:40:18 +01: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
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
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
Stephen Finucane
bfdf900d0a doc: Update cinder command mapping
I had incorrectly marked the 'api-version' command as WONTFIX. Turns out
we already support this, albeit via keystone as opposed to a
cinder-specific API.

Change-Id: I804ef1ca5a0f4df844d8c2229688c4edbac45aa9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-09-30 10:53:31 +01:00
00d8d945a1 Switch to 2023.1 Python3 unit tests and generic template name
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope. Also,
updating the template name to generic one.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ie3677749177a32507007833717b9bc484ce2c493
2022-09-23 14:15:54 +00: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
zeze
a9b9252da3 Adding missing command mapping in docs
nova command: version-list
openstack command: versions show --service compute

cinder command: version-list
openstack command: versions show --service block-storage

glance command: member-list
openstack command: image member list

Change-Id: I3c68dbd47dc92ed190ae9abaa90dfcddef072728
2022-09-16 01:28:46 +09: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
Zuul
7df94c9f82 Merge "Microversion 2.91: Support specifying destination host to unshelve" 2022-09-01 18:15:52 +00:00
Zuul
5cf8f37a93 Merge "Fix documents for replaced configuration name" 2022-08-31 02:34:31 +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
Zuul
27b2496e03 Merge "Migrate server_groups to the new API" 6.0.0 2022-08-09 17:33:39 +00:00
Snow Kim
701dd67d6c Fix documents for replaced configuration name
Since 4.0, '--os-url' global option is no longer supported.
And this option had been replaced to '--os-endpoint'

- Refer Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f
- Refer Docs: doc/source/cli/backwards-incompatible.rs

I fixed in documents as below
- OPTIONS: '--os-url' to '--os-endpoint'
- ENVIRONMENT VARIABLES: 'OS_URL' to 'OS_ENDPOINT'
- and relevant sentence

Change-Id: Ibb0cddf34375df941678ee07a005d81399ec7195
2022-08-05 19:51:32 +09: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
Yoonsoo Lim
e6adf37d12 Update the Nova CLI Mapping Guide
Update missing command in Mapping Guide.

List of updated command
[Nova CLI / OSC]
instance-action-list / server event list

Change-Id: I1436a6c1bdd881890e015cf0f1829c38378b36fa
2022-07-31 14:20:22 +09:00
Zuul
60dd6e6257 Merge "Drop support for Python 3.6, 3.7" 2022-07-27 11:45:06 +00:00
Zuul
b3ae3f5552 Merge "Add support for CRUD operations for QoS minimum packet rate rule" 2022-07-20 14:13:42 +00:00
likui
4e769f0ed0 Drop support for Python 3.6, 3.7
Python 3.6 and Python 3.7 support has been dropped since Zed [1]. This
necessitates changes our jobs to build and publish docker images since
those currently use Python 3.6. We now use Python 3.9.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: I228b7ff6691a025f1ba9b7d9449f294868942151
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
2022-07-04 17:48:55 +01:00
Stephen Finucane
e49ad1795b pre-commit: Allow unsafe YAML
We're using tags in '.zuul.yaml', which requires use of the unsafe
parser [1].

[1] https://stackoverflow.com/a/45967047

Change-Id: Ib97480f6fcaba7406ffe284e1935744346684b8b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-07-04 12:16:16 +01:00
Zuul
366e164738 Merge "Stop testing lower-constraints" 2022-07-01 18:01:08 +00: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
14b93fec76 image: Split image creation depending on service
The 'image create' operation is actually one of two operations: it can
be either an image service (glance) operation if the '--volume' argument
is *not* passed or a block storage (cinder) operation if it is. Make
this clearer and add a log warning users about options that are
supported by the former but not the latter.

Change-Id: Id153c951a7d18403568bf67e13d5e0a4827428d4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-06-30 11:54:45 +01: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
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
Stephen Finucane
2290b38ab3 image: Trivial style changes
Change-Id: I35b7b8a80609916eb47357af4398789788d66382
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-06-30 11:15:33 +01:00
Zuul
20e7b01af8 Merge "Skip test_quota_network_set_with_force func test" 2022-06-28 09:51:10 +00:00
Dr. Jens Harbott
c6e8648786 Skip test_quota_network_set_with_force func test
This test was added in [0] and it causes a lot of failures, since
setting the network quota to 1 will result in quota errors for any other
test that is trying to create a network in parallel. We can only run
this test in a serial tempest task that would need to be created for
such a scenario.

Related-Story: 2010110
Change-Id: I6015c181ecabff26bdb1b0c11b0e33ad39e6f083
2022-06-28 06:56:14 +02:00
Zuul
30622272e3 Merge "volume: Correct output of 'volume attachment create'" 2022-06-27 15:54:20 +00:00
Dr. Jens Harbott
604ceeedf9 Don't show tenant_id in network objects
Patch [0] dropped mapping the tenant_id attribute to project_id.
However, the Neutron API still returns the tenant_id attribute in
addition to the project_id and so we still need to discard it from
the output.

[0] I5f62f2a76592eaaaed6703624e959df41a6ecc8f

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Iba1e003bf587802f28928cb44d160b3b3fb1f840
2022-06-27 10:50:03 +02:00
Zuul
4f79def9aa Merge "Allow users to list all images" 2022-06-20 15:19:59 +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
Cyril Roelandt
34d1e0c7eb Allow users to list all images
Add a "--all" option to "openstack image list", which allows the user to
list all of the images.

Story: 2010071
Change-Id: I56a2e4846d0380d07803305fb830d1a43dfd71b3
2022-06-07 20:22:34 +02:00
Zuul
ed304992eb Merge "Changed minversion in tox to 3.18.0" 2022-06-01 15:54:37 +00:00
Zuul
6810414e45 Merge "Migrate osc-tox-py3N-tips to Python 3.8" 2022-05-25 06:12:21 +00:00
Takashi Kajinami
8a03f3cabc Migrate osc-tox-py3N-tips to Python 3.8
python-novaclient 18.0.0 removed support for Python 3.6 and 3.7 and
can't be installed in Python 3.6.

This change migrates the osc-tox-py3N-tips from Python 3.6 to Python
3.8 as Python 3.8 is the minimum version currently supported.

This also adds Python 3.9 to supported runtime list because it has been
tested since stable/yoga.

NOTE:
The osc-tox-py36-tips job is used by cliff, so the subsequent patch
for the cliff repo should be merged timely.

Change-Id: Id7a8f3ca5b704102aa18eb6bf98ae9ada005d013
2022-05-24 09:02:16 +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
Zuul
9fc9e8d9d7 Merge "Allow to filter multiple tags for image list" 2022-05-16 16:36:48 +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
Zuul
ccd877dd40 Merge "Fix typos" 2022-05-16 09:36:14 +00: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