heat engine : convert stack resource to physical_resource_name
Covert stack.Stack to use physical_resource_name or nested stack references are not fully-qualified Ref #241 Change-Id: I6e38a7de5af5fe79ddc62cfee9dfe26cae30df6c Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
parent
fd2c75938a
commit
84c04e3873
@ -60,7 +60,8 @@ class Stack(Resource):
|
|||||||
Handle the creation of the nested stack from a given JSON template.
|
Handle the creation of the nested stack from a given JSON template.
|
||||||
'''
|
'''
|
||||||
template = parser.Template(child_template)
|
template = parser.Template(child_template)
|
||||||
params = parser.Parameters(self.name, template, self._params())
|
params = parser.Parameters(self.physical_resource_name(), template,
|
||||||
|
self._params())
|
||||||
|
|
||||||
self._nested = parser.Stack(self.context,
|
self._nested = parser.Stack(self.context,
|
||||||
self.physical_resource_name(),
|
self.physical_resource_name(),
|
||||||
@ -93,8 +94,8 @@ class Stack(Resource):
|
|||||||
|
|
||||||
def FnGetAtt(self, key):
|
def FnGetAtt(self, key):
|
||||||
if not key.startswith('Outputs.'):
|
if not key.startswith('Outputs.'):
|
||||||
raise exception.InvalidTemplateAttribute(resource=self.name,
|
raise exception.InvalidTemplateAttribute(
|
||||||
key=key)
|
resource=self.physical_resource_name(), key=key)
|
||||||
|
|
||||||
prefix, dot, op = key.partition('.')
|
prefix, dot, op = key.partition('.')
|
||||||
stack = self.nested()
|
stack = self.nested()
|
||||||
@ -102,7 +103,7 @@ class Stack(Resource):
|
|||||||
# This seems like a hack, to get past validation
|
# This seems like a hack, to get past validation
|
||||||
return ''
|
return ''
|
||||||
if op not in stack.outputs:
|
if op not in stack.outputs:
|
||||||
raise exception.InvalidTemplateAttribute(resource=self.name,
|
raise exception.InvalidTemplateAttribute(
|
||||||
key=key)
|
resource=self.physical_resource_name(), key=key)
|
||||||
|
|
||||||
return stack.output(op)
|
return stack.output(op)
|
||||||
|
Loading…
Reference in New Issue
Block a user