From 0ab5edc962f6c71b233486cd4ff80d8a3137dde3 Mon Sep 17 00:00:00 2001 From: John Corrales Date: Tue, 15 Jan 2019 07:20:13 -0800 Subject: [PATCH] return delete_instance operation --- moto/cloudformation/models.py | 3 ++- moto/cloudformation/responses.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py index bbb1a0fd2..11b97aa34 100644 --- a/moto/cloudformation/models.py +++ b/moto/cloudformation/models.py @@ -103,8 +103,9 @@ class FakeStackSet(BaseModel): self.instances.delete(accounts, regions) - self._create_operation(operation_id=operation_id, action='DELETE', + operation = self._create_operation(operation_id=operation_id, action='DELETE', status='SUCCEEDED', accounts=accounts, regions=regions) + return operation def update_instances(self, accounts, regions, parameters, operation_id=None): if not operation_id: diff --git a/moto/cloudformation/responses.py b/moto/cloudformation/responses.py index 86eb3df0a..2c7f6b91a 100644 --- a/moto/cloudformation/responses.py +++ b/moto/cloudformation/responses.py @@ -368,10 +368,10 @@ class CloudFormationResponse(BaseResponse): stackset_name = self._get_param('StackSetName') accounts = self._get_multi_param('Accounts.member') regions = self._get_multi_param('Regions.member') - self.cloudformation_backend.delete_stack_instances(stackset_name, accounts, regions) + operation = self.cloudformation_backend.delete_stack_instances(stackset_name, accounts, regions) template = self.response_template(DELETE_STACK_INSTANCES_TEMPLATE) - return template.render() + return template.render(operation=operation) def describe_stack_set(self): stackset_name = self._get_param('StackSetName') @@ -806,7 +806,7 @@ LIST_STACK_INSTANCES_TEMPLATE = """ - d76a070d-279a-45f3-b9b4-example + {{ operation.OperationId }} e5325090-66f6-4ecd-a531-example