This rather complex function has had stuff tacked on over the years.
Help make working with it a bit easier through liberal application of
whitespace and some nicer indentation. Some option help text is improved
based on changes to modern nova.
Change-Id: I8154dd395dd904c3bcd180a7d0f9037b7e0be64f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
We were documenting that some of these policies were only supported with
specific microversions, however, we weren't actually enforcing that,
leading to a poor user experience. Correct this.
Change-Id: Ic3c555226a220efd9b0f27edffccf6c4c95c2747
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is equivalent to novaclient's 'live-migration-force-complete'
command.
Change-Id: Ic4dc639afa16cdf8c5a46774895e850d92985292
Story: 2007513
Task: 39293
Oslo things are really server-side oriented and are heavy-weight
for client things. Remove oslo.utils and just use iso8601 and
importlib directly. It's not actually a bad library, but pulling
it and its other deps in just for a couple of wrapper methods
is a bit much here.
oslo.i18n, fwiw, is lightweight and helpful.
Change-Id: I463993170c03a1d98c47ab6a3c19131b7fca1099
If we add a floating IP for the server with no fixed IP, CLI doesn't
report an error and nothing happens. The patch adds an error message
when the server which don't have fixed IP bind floating IP.
Change-Id: I400f2bab08521bb7fa443d87c7f45cc79eb80694
Task: 27941
Story: 2004346
With python3.x, classes can use 'metaclass=' instead of
'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can
be replaced by 'items' and 'keys', 'six.moves.urllib.parse'
can be replaced by 'urllib.parse', 'six.StringIO' and
'six.moves.cStringIO' can be replaced by 'io.StringIO',
'six.text_type' and 'six.string_type' are just 'str'.
Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b
Add ``openstack server migration list`` to fetch server migrations.
Part of blueprint add-user-id-field-to-the-migrations-table
Change-Id: I15b4a5aca8d0dee59dd293e7b1c7272cdfbeea20
Fixes incorrect json output for 'openstack server show -f json'.
The security group json output groups all the json as one
for e.g. "security_groups": "name='group1'\nname='group2'"
The correct output should be
"security_groups" : [{"name" : "group1"}, {"name" : "group2"}]
properties and volumes_attached fields also has similar issue.
Story: 2007755
Change-Id: I1b1cac716329e0530400aff782c08000b21d8e1d
There was a problem that the '-image-property' option, which can be used
to create an instance, did not work as intended.
I found that there were two problems with this option.
First, I cannot select an image as its metadata.
The second is that when there are multiple images available, the desired
image may not be selected depending on the situation.
This patch solves these two problems.
I wrote the test case with these two problems considered together.
Change-Id: Ib2745d7e067056ff4ca8bfaf6cff492d0dacb73a
story: #2007860
For a server booted from a volume, nova API does not store an image_id
and instead returns an empty string. Currently, openstackclient
similarly shows an empty string for Image Name and Image ID for servers
booted from volumes.
To aid CLI users in understanding the meaning of no image_id, we can
display the string "N/A (booted from volume)" in the image field if the
server was booted from a volume.
Change-Id: I9c62cf6fe23b2e934dcbf5ebbf706b2705d2e424
Despite what the help text for this options says, the nova API only
accepts boolean values for this value and has done so since at least the
introduction of the 2.1 microversioned API. While it would be nice to
convert '--config-drive' to a boolean flag, we'd need to be able to
retain temporary support for people passing arguments. 'nargs=?' [1]
looks promising but it has an annoying tendency to swallow a positional
argument following it [2]. Since that is not an option, we have to live
with a new config option, '--use-config-drive' and a '--no-config-drive'
counterpart.
[1] https://docs.python.org/3/library/argparse.html#nargs
[2] https://bugs.python.org/issue9338
Change-Id: If9cce0ad4094cc9cef1c9136b80c3b0f35a82c7a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: #2005468
Task: #30547
Modified take_action() method for SetFlavor to use
flavor id instead of flavor name when setting description
Closes-Bug: #1844708
Story: #2007781
Task: #40019
Change-Id: If6798c89fef4c9feb4ebb460722b891f5655037d
The switch to using glance from the SDK accidentally used get_image
directly during a server rebuild, when it should have used find_image to
match existing functionality.
Bug introduced in: I36f292fb70c98f6e558f58be55d533d979c47ca7
Change-Id: I2005bd40a1bd6719670c7f7854316b4f9801b140
Story: 2007620
Task: 39643
This is a work to switch OSC from using glanceclient to OpenStackSDK.
With this change only v2 is using OpenStackSDK. V1 is still using
glanceclient and will be switched in a separate change.
Remove the direct depend on keystoneauth- let that flow through
openstacksdk.
Depends-on: https://review.opendev.org/#/c/698972
Change-Id: I36f292fb70c98f6e558f58be55d533d979c47ca7
Does what it says on the tin. This action was added to osc-lib in change
If73cab759fa09bddf1ff519923c5972c3b2052b1.
Change-Id: I51efaa096bb26e297d99634c5d9cca34c0919074
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>