Pass unresolved template to Resource.update()
Previously the 'after' template passed to Resource.update() was completely resolved. This led to an odd situation where the contents of a resource's template snippet were either unresolved (but parsed) or resolved depending on whether the resource had been updated or not. Resolve (ha!) this discrepancy by passing a version of the template with the intrinsic functions unresolved. Change-Id: I8c11cdc3c28661db689b416833bde34cea12d98a
This commit is contained in:
parent
062b5e99ca
commit
2ea4bcf506
@ -545,7 +545,8 @@ class Resource(object):
|
||||
self.name,
|
||||
self.context)
|
||||
after_properties.validate()
|
||||
tmpl_diff = self.update_template_diff(after, before)
|
||||
tmpl_diff = self.update_template_diff(function.resolve(after),
|
||||
before)
|
||||
prop_diff = self.update_template_diff_properties(after_properties,
|
||||
before_properties)
|
||||
if callable(getattr(self, 'handle_update', None)):
|
||||
|
@ -146,8 +146,7 @@ class StackUpdate(object):
|
||||
# Note the new resource snippet is resolved in the context
|
||||
# of the existing stack (which is the stack being updated)
|
||||
raw_snippet = copy.deepcopy(new_res.t)
|
||||
parsed_snippet = self.existing_stack.resolve_static_data(raw_snippet)
|
||||
new_snippet = self.existing_stack.resolve_runtime_data(parsed_snippet)
|
||||
new_snippet = self.existing_stack.resolve_static_data(raw_snippet)
|
||||
|
||||
return existing_res.update(new_snippet, existing_snippet,
|
||||
prev_resource=prev_res)
|
||||
|
Loading…
Reference in New Issue
Block a user