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
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>
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
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
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
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
This is the equivalent of the 'image-stage' glanceclient command.
Change-Id: I10b01ef145740a2f7ffe5a8c7ce0296df0ece0bd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
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>
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>
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
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
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>
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