python-openstackclient/openstackclient
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
..
api Remove usage of six 2020-10-07 02:15:25 +00:00
common Merge "Fix typos" 2022-05-16 09:36:14 +00:00
compute Merge "Add more filter option of columns for server list -c COLUMN" 2022-06-20 15:19:49 +00:00
identity Fix typos 2021-10-26 15:53:51 +02:00
image Fix: create image from volume command 2022-06-30 11:15:33 +01:00
locale/tr_TR/LC_MESSAGES Imported Translations from Zanata 2018-03-01 07:25:50 +00:00
network Don't show tenant_id in network objects 2022-06-27 10:50:03 +02:00
object Add storage policy option to create container command 2020-02-19 10:08:48 +13:00
tests Fix: create image from volume command 2022-06-30 11:15:33 +01:00
volume Merge "volume: Correct output of 'volume attachment create'" 2022-06-27 15:54:20 +00:00
__init__.py Clean up W503 and E402 pep8 errors 2018-04-15 12:23:06 +09:00
i18n.py Remove log translations 2017-03-21 17:23:09 +08:00
shell.py Remove usage of six 2020-10-07 02:15:25 +00:00