Attributes for an individual resource in an OS::Heat::AutoScalingGroup can
be retrieved using the attribute name 'resource.<index>'. Because we were
treating the index as a resource name when generating the template, we
would never generate an output in the nested template that referenced the
resource's attribute, so it wouldn't get cached. Since we can't know the
indices ahead of time, the only way to cache these is to do it for all
resources in the group - which is the same data cached by the equivalent
'outputs' attribute.
We also need to take into account both possible forms of syntax:
Reviewed: https:/ /review. openstack. org/530975 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=4a3a1ad15bd cfd67e0548481c7 0545e41a9476d9
Committed: https:/
Submitter: Zuul
Branch: master
commit 4a3a1ad15bdcfd6 7e0548481c70545 e41a9476d9
Author: Zane Bitter <email address hidden>
Date: Mon Jan 8 17:23:12 2018 -0500
Fix attribute caching in Heat AutoScalingGroup
Attributes for an individual resource in an OS::Heat: :AutoScalingGro up can
be retrieved using the attribute name 'resource.<index>'. Because we were
treating the index as a resource name when generating the template, we
would never generate an output in the nested template that referenced the
resource's attribute, so it wouldn't get cached. Since we can't know the
indices ahead of time, the only way to cache these is to do it for all
resources in the group - which is the same data cached by the equivalent
'outputs' attribute.
We also need to take into account both possible forms of syntax:
or:
Change-Id: I1d2898cdd4759b 1bb9de1896a4005 6685e728f44
Closes-Bug: #1737047
Partial-Bug: #1731349
Related-Bug: #1660831