diff options
| author | Stephen Finucane <sfinucan@redhat.com> | 2020-12-22 16:46:33 +0000 |
|---|---|---|
| committer | Stephen Finucane <sfinucan@redhat.com> | 2020-12-22 17:11:32 +0000 |
| commit | 29a7c9afce32e7acbd40b9e4a73140ef9e05e7f3 (patch) | |
| tree | 883bbe45f97a63db310db8c77c62c288b53f5b6a /openstackclient/tests/functional/image | |
| parent | f5b185c35728025ebfd4145c800648b34476b775 (diff) | |
| download | python-openstackclient-29a7c9afce32e7acbd40b9e4a73140ef9e05e7f3.tar.gz | |
image: Unset properties rather than setting to None
Currently, we attempt to unset an image property by setting it to None.
This doesn't work for known properties and is rightly rejected by the
Glance API with the following error:
BadRequestException: 400: Client Error for url:
http://172.20.4.87/image/v2/images/368c5751-2b0b-4a38-a255-fd146fe52d31,
Bad Request
The solution is to actually unset the field by deleting it.
Change-Id: Ie156bedbe0f9244f82c81401679706f484caf9aa
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: #2008463
Task: #41493
Diffstat (limited to 'openstackclient/tests/functional/image')
| -rw-r--r-- | openstackclient/tests/functional/image/v2/test_image.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/image/v2/test_image.py b/openstackclient/tests/functional/image/v2/test_image.py index 264ba519..0a3a7360 100644 --- a/openstackclient/tests/functional/image/v2/test_image.py +++ b/openstackclient/tests/functional/image/v2/test_image.py @@ -119,6 +119,7 @@ class ImageTests(base.BaseImageTests): 'image set ' + '--property a=b ' + '--property c=d ' + + '--property hw_rng_model=virtio ' + '--public ' + self.name ) @@ -133,6 +134,7 @@ class ImageTests(base.BaseImageTests): 'image unset ' + '--property a ' + '--property c ' + + '--property hw_rng_model ' + self.name ) json_output = json.loads(self.openstack( |
