diff --git a/heat/engine/resources/stack_resource.py b/heat/engine/resources/stack_resource.py index 751c6c1599..2978879a9f 100644 --- a/heat/engine/resources/stack_resource.py +++ b/heat/engine/resources/stack_resource.py @@ -524,9 +524,10 @@ class StackResource(resource.Resource): if self.abandon_in_progress: self.rpc_client().abandon_stack(self.context, stack_identity) else: - self.rpc_client().delete_stack(self.context, stack_identity) + self.rpc_client().delete_stack(self.context, stack_identity, + cast=False) except Exception as ex: - self.rpc_client().ignore_error_named(ex, 'NotFound') + self.rpc_client().ignore_error_named(ex, 'EntityNotFound') def handle_delete(self): return self.delete_nested() diff --git a/heat/tests/test_nested_stack.py b/heat/tests/test_nested_stack.py index 77d5d4081c..24c8eaf125 100644 --- a/heat/tests/test_nested_stack.py +++ b/heat/tests/test_nested_stack.py @@ -413,4 +413,4 @@ Outputs: self.res.nested().identifier.return_value = stack_identity self.res.handle_delete() self.res.rpc_client.return_value.delete_stack.assert_called_once_with( - self.ctx, self.res.nested().identifier()) + self.ctx, self.res.nested().identifier(), cast=False) diff --git a/heat/tests/test_provider_template.py b/heat/tests/test_provider_template.py index 7e48f341cb..6148681c65 100644 --- a/heat/tests/test_provider_template.py +++ b/heat/tests/test_provider_template.py @@ -1021,4 +1021,5 @@ class TemplateResourceCrudTest(common.HeatTestCase): rpcc = self.res.rpc_client.return_value rpcc.delete_stack.assert_called_once_with( self.ctx, - self.res.nested().identifier()) + self.res.nested().identifier(), + cast=False) diff --git a/heat/tests/test_stack_resource.py b/heat/tests/test_stack_resource.py index f8e506ce86..c809d27d86 100644 --- a/heat/tests/test_stack_resource.py +++ b/heat/tests/test_stack_resource.py @@ -514,7 +514,7 @@ class StackResourceTest(StackResourceBaseTest): side_effect=exception.NotFound()) self.assertIsNone(self.parent_resource.delete_nested()) rpcc.return_value.delete_stack.assert_called_once_with( - self.parent_resource.context, mock.ANY) + self.parent_resource.context, mock.ANY, cast=False) def test_need_update_for_nested_resource(self): """Test the resource with nested stack should need update.