]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Call calulate_properties() before calling FnGetAtt()
authorAngus Salkeld <asalkeld@redhat.com>
Wed, 25 Jul 2012 02:36:35 +0000 (12:36 +1000)
committerAngus Salkeld <asalkeld@redhat.com>
Wed, 25 Jul 2012 02:36:35 +0000 (12:36 +1000)
The problem is that in the delete the order of resolution is reversed
so in delete loop we have not yet done a calulate_properties() on the
resource that we are about to call FnGetAtt() for.

Fixes #178
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Change-Id: I8af6f8a78086a7b1f2bcc280d57af0b4311f08cc

heat/engine/checkeddict.py
heat/engine/parser.py

index 554aab08d3ab284c8d14934cc4bd57d16155e078..90a04174cee6c5e40de97ec399c7246b19a5e72f 100644 (file)
@@ -135,9 +135,10 @@ class CheckedDict(collections.MutableMapping):
             if not self.data[key]['Required']:
                 return None
             else:
-                raise ValueError('%s: %s must be provided' % (self.name, key))
+                raise ValueError('%s: Property %s not assigned' % (self.name,
+                                                                   key))
         else:
-            raise ValueError('%s: %s must be provided' % (self.name, key))
+            raise ValueError('%s: Property %s not assigned' % (self.name, key))
 
     def __len__(self):
         return len(self.data)
index df265526cda46caae4cc94a8db4bf99ed3a547da..fd1b00c5c8317e750f4f560090f6652dbfee468a 100644 (file)
@@ -554,8 +554,10 @@ class Stack(object):
         '''
         self.state_set(self.DELETE_IN_PROGRESS, 'Stack deletion started')
 
-        failures = []
+        for res in self:
+            res.calculate_properties()
 
+        failures = []
         for res in reversed(self):
             result = res.destroy()
             if result: