Merge "Convergence: Avoid cache when resolving input data"

This commit is contained in:
Jenkins 2016-03-14 14:29:25 +00:00 committed by Gerrit Code Review
commit aad322c705
2 changed files with 4 additions and 4 deletions

View File

@ -334,15 +334,15 @@ def construct_input_data(rsrc, curr_stack):
for attr in attributes:
try:
if isinstance(attr, six.string_types):
resolved_attributes[attr] = rsrc.FnGetAtt(attr)
resolved_attributes[attr] = rsrc.get_attribute(attr)
else:
resolved_attributes[attr] = rsrc.FnGetAtt(*attr)
resolved_attributes[attr] = rsrc.get_attribute(*attr)
except exception.InvalidTemplateAttribute as ita:
LOG.info(six.text_type(ita))
input_data = {'id': rsrc.id,
'name': rsrc.name,
'reference_id': rsrc.FnGetRefId(),
'reference_id': rsrc.get_reference_id(),
'attrs': resolved_attributes,
'status': rsrc.status,
'action': rsrc.action,

View File

@ -621,7 +621,7 @@ class MiscMethodsTest(common.HeatTestCase):
'uuid': mock.ANY,
'action': mock.ANY,
'status': mock.ANY}
self.resource.FnGetAtt = mock.Mock(
self.resource.get_attribute = mock.Mock(
side_effect=exception.InvalidTemplateAttribute(resource='A',
key='value'))
actual_input_data = worker.construct_input_data(self.resource,