Skip to content

Commit 136dd03

Browse files
committed
Fix creation of protected image for old user code
Commit afb4969 [1][2] replaced "protected" with "is_protected" in raw image properties in order to fix an server-side schema validation error (400 Bad Request) when defining image properties. That change broke user code which calls e.g. create_image() with "protected" instead of "is_protected" causing the exact server-side schema validation error which it tried to fix for "is_protected" [3]. This patch readds "protected" to raw image properties and thus allows clients to continue to use the old "protected" attribute. Ref.: [1] afb4969 [2] https://review.opendev.org/c/openstack/openstacksdk/+/820926 [3] https://bugs.launchpad.net/python-glanceclient/+bug/1927215 Change-Id: I37b046dd71c29734504cf55f272b6dffbb8b2aad
1 parent 6b2f555 commit 136dd03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openstack/image/v2/_proxy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Rackspace returns this for intermittent import errors
2727
_IMAGE_ERROR_396 = "Image cannot be imported. Error code: '396'"
2828
_INT_PROPERTIES = ('min_disk', 'min_ram', 'size', 'virtual_size')
29-
_RAW_PROPERTIES = ('is_protected', 'tags')
29+
_RAW_PROPERTIES = ('is_protected', 'protected', 'tags')
3030

3131

3232
class Proxy(_base_proxy.BaseImageProxy):

0 commit comments

Comments
 (0)