Merge pull request #1407 from nimbusscale/cloudformation_updates

FakeStack update to support both JSON and YAML templates
This commit is contained in:
Jack Danger 2017-12-26 15:25:58 -08:00 committed by GitHub
commit 6a29800ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,8 @@ class FakeStack(BaseModel):
def update(self, template, role_arn=None, parameters=None, tags=None):
self._add_stack_event("UPDATE_IN_PROGRESS", resource_status_reason="User Initiated")
self.template = template
self.resource_map.update(json.loads(template), parameters)
self._parse_template()
self.resource_map.update(self.template_dict, parameters)
self.output_map = self._create_output_map()
self._add_stack_event("UPDATE_COMPLETE")
self.status = "UPDATE_COMPLETE"