From 571b4f6168115af5ff873ca0dc2dfae86a5309c0 Mon Sep 17 00:00:00 2001 From: Peter Razumovsky Date: Wed, 20 Jan 2016 18:53:36 +0300 Subject: [PATCH] Add default values to several Glance::Image props Default values described in properties descriptions, but not specified. So, need to specify it in schema. Also, protected property defined with False by default in Glance, so need to update Heat side with default value of property. Change-Id: I6d50068565d8aa460c82347d5539f878339f9c15 --- heat/engine/resources/openstack/glance/image.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/heat/engine/resources/openstack/glance/image.py b/heat/engine/resources/openstack/glance/image.py index 3cb4b9c5f6..89c8f1c0cf 100644 --- a/heat/engine/resources/openstack/glance/image.py +++ b/heat/engine/resources/openstack/glance/image.py @@ -58,7 +58,8 @@ class GlanceImage(resource.Resource): 'and means no limit on the disk size.'), constraints=[ constraints.Range(min=0), - ] + ], + default=0 ), MIN_RAM: properties.Schema( properties.Schema.INTEGER, @@ -66,12 +67,14 @@ class GlanceImage(resource.Resource): 'is 0 if not specified and means no limit on the ram size.'), constraints=[ constraints.Range(min=0), - ] + ], + default=0 ), PROTECTED: properties.Schema( properties.Schema.BOOLEAN, _('Whether the image can be deleted. If the value is True, ' - 'the image is protected and cannot be deleted.') + 'the image is protected and cannot be deleted.'), + default=False ), DISK_FORMAT: properties.Schema( properties.Schema.STRING,