python-openstackclient/openstackclient/image
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
..
v1 Remove 'get_osc_show_columns_for_sdk_resource' duplicates 2021-10-21 17:14:45 +01:00
v2 Fix: create image from volume command 2022-06-30 11:15:33 +01:00
__init__.py Remove copyright from empty files 2014-01-20 17:28:13 +04:00
client.py Complete switch from glanceclient to SDK for image service 2020-03-24 13:13:06 +00:00