5458 Commits

Author SHA1 Message Date
Daniel Wilson
70dbb01ea3 Use the SDK for server show
Use the SDK for the server show command. This change modifies a helper
function that is used by server show as well as other commands that
print information about an individual server. The helper still uses
novaclient APIs when additional OpenStack requests are needed since some
of its callers are still using the nova client.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/864340
Change-Id: Ic253184ee5f911ec2052419d328260dc4664b273
2022-12-11 18:04:29 -05:00
Zuul
10453e085f Merge "Revert "Don't look up project by id if given id"" 2022-12-02 14:21:51 +00:00
Zuul
3cb4e9c714 Merge "tests: Convert network tests to use 'parse_output'" 2022-12-02 14:21:49 +00:00
Zuul
f9d2d69ed2 Merge "tests: Convert compute tests to use 'parse_output'" 2022-12-02 14:21:47 +00:00
Zuul
cc481f568b Merge "tests: Convert identity tests to use 'parse_output'" 2022-12-02 14:21:45 +00:00
Zuul
a5f207b657 Merge "tests: Convert volume tests to use 'parse_output'" 2022-12-02 14:21:43 +00:00
Zuul
5aecefe911 Merge "tests: Convert image tests to use 'parse_output'" 2022-12-02 14:21:40 +00:00
Zuul
70f05a6610 Merge "Use the compute SDK in server list" 2022-12-02 14:21:38 +00:00
Stephen Finucane
85254fbeb4 Revert "Don't look up project by id if given id"
This reverts commit 042be7c7fe89f5a1a190af90d5980205d995941b. This
solution worked but it was confusing. The issue that the author was
seeing was presumably due to users not being able to list projects but in
theory the 'openstackclient.image.common.find_project' function that was
being called here should have already handle this. It transpires however
that there was a bug in this and we weren't correctly handling HTTP 403
errors correctly. This bug has since been fixed in change
I2ea2def607ec5be112e42d53a1e660fef0cdd69c meaning this change is no
longer necessary. Remove it and simplify the code somewhat.

Change-Id: I108efec2c8deda50fcb9cc84f313602bed2ac15c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-30 12:35:17 +00:00
Daniel Wilson
c97f73ce2a Use the compute SDK in server list
Update server list to use the compute component of the OpenStack SDK
instead of directly using the nova interface. This change depends on SDK
version 0.102.0 for automatic client-side query filters.

Change-Id: Ib9985812bfd98320b75f3a82bb594a0daa6e4d93
2022-11-29 20:24:45 -05:00
Zuul
6cd72f6182 Merge "Adding volume backend commands to volume v3" 2022-11-29 23:03:59 +00:00
Zuul
0a9533709f Merge "Improve server dump create helptext" 2022-11-29 20:52:23 +00:00
Zuul
6413b25dec Merge "Add note about microversion 2.87 in server rescue help" 2022-11-29 20:49:50 +00:00
Zuul
92a1c854bb Merge "Add test for creating volume from source" 2022-11-29 20:49:48 +00:00
Stephen Finucane
50aed3fea2 tests: Convert network tests to use 'parse_output'
Change-Id: I93e2a4e0a4c7ec07da0c78a171f3d787125af053
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-29 16:21:29 +00:00
Stephen Finucane
874519e980 tests: Convert compute tests to use 'parse_output'
Change-Id: Ib5b2f46639f14877a9ec295b26cae01a05395d4d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-29 16:21:29 +00:00
Stephen Finucane
6daa6be392 tests: Convert identity tests to use 'parse_output'
Change-Id: I10711b911986af0348946f6254cf36773110b0ab
2022-11-29 16:21:29 +00:00
Stephen Finucane
686fabef31 tests: Convert volume tests to use 'parse_output'
Change-Id: Iec8ca873f6bc3993e0ba557f68895d9aefb6f9c6
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-29 16:21:29 +00:00
Stephen Finucane
dc03ce98de tests: Convert image tests to use 'parse_output'
Change-Id: I5f256d466d503d70d1f380016f9c8f5a0d9e395f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-29 16:20:03 +00:00
Ilya Popov
f0f54f0100 Adding volume backend commands to volume v3
Task: 46959
Story: 2010454
Change-Id: I6ed5f54079b88bc9fdfa24474a480a2786eda745
2022-11-29 16:44:59 +03:00
Stephen Finucane
948198643f docs: Typo fix
Change-Id: I2d55747b1226207946f80f04b80b4685e3eea3f9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-25 17:28:50 +00:00
Stephen Finucane
abf1a7cc4b docs: Small cleanup of human interface guide
Before we add more content.

Change-Id: I6cf28bdd217326db991466a21221b685124d4b99
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-24 13:02:10 +00:00
whoami-rajat
4710cbeca6 Add test for creating volume from source
This patch adds a test to create a new volume from source.
We also include code changes to pass the right size i.e. either
size passed by the user via --size argument or the source volume
size. This case is already handled at the API layer[1] but it
helps being consistent with passing the right size value as in case
of creating a volume from snapshot or backup.

[1] 7c1a5ce7b1/cinder/api/v3/volumes.py (L381-L382)

Change-Id: Idc71636dad6bb678fe24f19b0836d2e9bd92d7d2
2022-11-23 14:20:06 +05:30
whoami-rajat
96162c24ea Change --size helptext to include backup
Followup from [1]. Modifying help text of --size
argument to include --backup option.

[1] https://review.opendev.org/c/openstack/python-openstackclient/+/864893

Change-Id: I12cf60079ebcfe1cd059602fbfc1a13c8fe86803
2022-11-22 21:20:19 +05:30
whoami-rajat
bd0727c4f8 Add option to create volume from backup
Support for creating a volume from backup was added in
microversio 3.47. This patch adds a --backup option
to the volume create command to add that support.

Change-Id: Ib26d2d335475d9aacbf77c0fd7b7cda2ba743943
2022-11-21 20:30:09 +05:30
Zuul
56b0f6de0e Merge "image: Add 'image stage' command" 2022-11-16 12:38:10 +00:00
Zuul
222ea8def2 Merge "image: Simplify handling of data provided via stdin" 2022-11-16 12:37:58 +00:00
Zuul
a2706f5a80 Merge "image: Ignore '--progress' if providing image data from stdin" 2022-11-16 12:27:47 +00:00
Zuul
e708ddc2a3 Merge "Moved hypervisor to the SDK" 2022-11-16 11:18:32 +00:00
Zuul
06afa9b8cf Merge "Use the compute SDK in usage commands" 2022-11-16 09:46:59 +00:00
Zuul
d09aef5a01 Merge "compute: Add missing microversion check for networks" 2022-11-16 09:43:55 +00:00
Zuul
16f18d4a80 Merge "compute: Fix '--network none/auto' handling" 2022-11-16 09:20:21 +00:00
Jadon Naas
348eb79632 Docstring fix for CreateVolumeAttachment class
The command "volume attachment create" has a typo in the docstring.
The docstring says to use "server add volume", but the command is
actually "server volume add". This
change fixes the typo in the docstring.

Task: 46781
Story: 2010401
Change-Id: Ie19a24ead100dd9177669653a7a9997772ef4538
2022-11-10 11:51:18 -05:00
Zuul
50015b9608 Merge "tests: Convert more functional tests to use 'parse_output'" 2022-11-10 13:10:21 +00:00
Zuul
d5b6f5a183 Merge "tests: Move json decoding to base test class" 2022-11-10 13:00:50 +00:00
Violet Kurtz
006e35509d Moved hypervisor to the SDK
Change-Id: Ie955fb4d27c30e044626732a1f3e0f141cb85aa5
2022-11-09 19:33:54 +00:00
Stephen Finucane
1fb8d1f48b image: Add 'image stage' command
This is the equivalent of the 'image-stage' glanceclient command.

Change-Id: I10b01ef145740a2f7ffe5a8c7ce0296df0ece0bd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-09 16:51:54 +00:00
Stephen Finucane
3d9a9df935 image: Simplify handling of data provided via stdin
This was unnecessarily complex.

Change-Id: I8289d5ce7356d8bc89425590a7f71bca91a6d396
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-09 16:51:54 +00:00
Stephen Finucane
bafece762a image: Ignore '--progress' if providing image data from stdin
You can provide data via stdin when creating an image. Using this with
'--progress' makes no sense and causes an error currently. Fix this.

Change-Id: I3c2d658b72a7c62931b779b0d19bb97f60a0c655
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-09 16:51:54 +00:00
Zuul
31881c0b2b Merge "zuul: Remove nova-network tests" 2022-11-08 19:48:42 +00:00
Stephen Finucane
38e39b6dc1 tests: Convert more functional tests to use 'parse_output'
Change-Id: I1d968181eb196c6df4583c772c67ed58bc7ba585
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-08 16:39:05 +00:00
Stephen Finucane
a244bb84e0 tests: Move json decoding to base test class
We do this everywhere. Add a simple knob to simplify the pattern. Only
one use is migrated initially. The rest will be done separately.

Change-Id: Ic3b8958bd4fb1459a8ac3adaff216c2a26628491
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-08 16:39:02 +00:00
Stephen Finucane
ffb69116b3 compute: Add missing microversion check for networks
The 'auto' and 'none' network allocation policies are only supported on
compute API microversion 2.37 or later. Enforce this in the code.

Change-Id: I90f8fb1e61ead4bd406ea76bbeb731b913805b13
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2010385
Task: 46657
2022-11-08 11:28:31 +00:00
Stephen Finucane
ed0d568b94 compute: Fix '--network none/auto' handling
This should lookup a network called 'none' or 'auto', not do the
equivalent on '--nic none' or '--nic auto'. Correct this.

Change-Id: I3c5acc49bfe8162d8fb6110603da56d56090b78f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: 2010385
Task: 46658
2022-11-08 11:25:19 +00:00
Zuul
681934a96a Merge "compute: Add '--no-network', '--auto-network' flags" 2022-11-08 10:48:36 +00:00
Stephen Finucane
1d71479a4c zuul: Remove nova-network tests
nova-network has been removed from nova for a very long time now and
we've no way to test it in CI save for installing old versions of
OpenStack. We don't care about this enough to do that, so just remove
the thing.

In the vein of things that have been removed, we also remove
configuration that was supposed to enable cinder's v1 API but doesn't
since the related knob was removed over 5 years ago [1].

[1] 3e91de956e

Change-Id: I76efeccec04937c3a68108e2654872e00fadcec4
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-11-08 10:20:30 +00:00
melanie witt
d7aa53b9a2 Add note about microversion 2.87 in server rescue help
The ability to rescue a volume-backed server was added in compute
microversion 2.87 [1].

This adds a note to the command help to improve user experience.

[1] https://docs.openstack.org/nova/latest/user/rescue.html

Change-Id: I5f40c3ca28e13bd1f979bc5f8c337302a3b9a5be
2022-11-07 22:54:55 +00:00
Zuul
70de31755d Merge "Run swift in -tips job" 2022-11-07 22:53:03 +00:00
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