Translate is_protected to protected
When creating or updating an image, translate the 'is_protected' argument into the proper 'protected' image attribute. Fix bug 1023653 Change-Id: Icfe6c38e4fda098ce3f90fd94c8fbbc18be2f4a8
This commit is contained in:
@@ -113,6 +113,9 @@ def do_image_create(gc, args):
|
|||||||
|
|
||||||
fields['is_public'] = fields.pop('public')
|
fields['is_public'] = fields.pop('public')
|
||||||
|
|
||||||
|
if 'is_protected' in fields:
|
||||||
|
fields['protected'] = fields.pop('is_protected')
|
||||||
|
|
||||||
raw_properties = fields.pop('property')
|
raw_properties = fields.pop('property')
|
||||||
fields['properties'] = {}
|
fields['properties'] = {}
|
||||||
for datum in raw_properties:
|
for datum in raw_properties:
|
||||||
@@ -180,6 +183,9 @@ def do_image_update(gc, args):
|
|||||||
|
|
||||||
image_id = fields.pop('id')
|
image_id = fields.pop('id')
|
||||||
|
|
||||||
|
if 'is_protected' in fields:
|
||||||
|
fields['protected'] = fields.pop('is_protected')
|
||||||
|
|
||||||
raw_properties = fields.pop('property')
|
raw_properties = fields.pop('property')
|
||||||
fields['properties'] = {}
|
fields['properties'] = {}
|
||||||
for datum in raw_properties:
|
for datum in raw_properties:
|
||||||
|
|||||||
Reference in New Issue
Block a user