From: Angus Salkeld Date: Wed, 25 Jul 2012 02:36:35 +0000 (+1000) Subject: Call calulate_properties() before calling FnGetAtt() X-Git-Tag: 2014.1~1561 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=783b1112490ef07db05251c1258c04f8b1caa5a0;p=openstack-build%2Fheat-build.git Call calulate_properties() before calling FnGetAtt() 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 Change-Id: I8af6f8a78086a7b1f2bcc280d57af0b4311f08cc --- diff --git a/heat/engine/checkeddict.py b/heat/engine/checkeddict.py index 554aab08..90a04174 100644 --- a/heat/engine/checkeddict.py +++ b/heat/engine/checkeddict.py @@ -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) diff --git a/heat/engine/parser.py b/heat/engine/parser.py index df265526..fd1b00c5 100644 --- a/heat/engine/parser.py +++ b/heat/engine/parser.py @@ -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: