From 7d059fdc00278acd3859b25a39caf1e3741bb51d Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Sat, 11 Jun 2016 20:43:16 -0500 Subject: [PATCH] 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 --- library/glance | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/glance b/library/glance index 87d630e..ad10976 100644 --- a/library/glance +++ b/library/glance @@ -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':