Optionally include image properties

Since glance image_properties is not a required argument, only attempt
to include it in the glance image create options when it's provided.

Change-Id: Ia4b27e1f3b433ac0efa89a1794c81f9c522093fb
This commit is contained in:
Jimmy McCrory 2016-06-11 20:43:16 -05:00
parent 7d534a4e8d
commit 7d059fdc00

View File

@ -187,9 +187,10 @@ class ManageGlance(object):
name=image_name,
disk_format=p['image_disk_format'],
container_format=p['image_container_format'],
copy_from=p['image_url'],
properties=p['image_properties']
copy_from=p['image_url']
)
if p['image_properties']:
image_opts['properties'] = p['image_properties']
if v == '1':
image_opts['is_public'] = p['image_is_public']
elif v == '2':