Merge "Fix resource.<n> attribute caching in ResourceGroup/Chain"

This commit is contained in:
Zuul 2018-01-31 19:29:05 +00:00 committed by Gerrit Code Review
commit f5f00514e0
2 changed files with 6 additions and 6 deletions

View File

@ -171,9 +171,9 @@ class ResourceChain(stack_resource.StackResource):
if key.startswith("resource."):
keycomponents = key.split('.', 2)
res_name = keycomponents[1]
attr_name = keycomponents[2:]
if attr_name and (res_name in resource_names):
value = get_attr_fn([res_name] + attr_name + path)
attr_path = keycomponents[2:] + path
if attr_path and (res_name in resource_names):
value = get_attr_fn([res_name] + attr_path)
yield output.OutputDefinition(output_name, value)
elif key == self.ATTR_ATTRIBUTES and path:

View File

@ -492,9 +492,9 @@ class ResourceGroup(stack_resource.StackResource):
if key.startswith("resource."):
keycomponents = key.split('.', 2)
res_name = keycomponents[1]
attr_name = keycomponents[2:]
if attr_name and (res_name in resource_names):
value = get_attr_fn([res_name] + attr_name + path)
attr_path = keycomponents[2:] + path
if attr_path and (res_name in resource_names):
value = get_attr_fn([res_name] + attr_path)
yield output.OutputDefinition(output_name, value)
elif key == self.ATTR_ATTRIBUTES and path: