From 1f88c675c42727ce4abd12c62df7017194d6c4ac Mon Sep 17 00:00:00 2001 From: rabi Date: Mon, 18 Jul 2016 18:45:28 +0530 Subject: Remove tenant_safe flag from rpc and db api We can use admin_context to have access to stacks and software configs across projects. This removes the tenant_safe flag from rpc and db api. This is backward compatible with older rpc clients. We still support use of global_tenant flag for listing stacks and software configs. However, by default an admin(user with admin role in admin_project) would not need that. Change-Id: I12303dbf30fb80290f95baba0c67cdf684f5f409 --- heat/tests/api/cfn/test_api_cfn_v1.py | 8 +-- heat/tests/api/openstack_v1/test_stacks.py | 29 ++++---- .../api/openstack_v1/test_views_stacks_view.py | 8 +-- heat/tests/db/test_sqlalchemy_api.py | 38 +++------- heat/tests/engine/service/test_service_engine.py | 2 +- heat/tests/engine/service/test_stack_watch.py | 2 +- heat/tests/test_engine_service.py | 83 +--------------------- heat/tests/test_rpc_client.py | 5 +- heat/tests/test_stack_lock.py | 4 -- 9 files changed, 34 insertions(+), 145 deletions(-) (limited to 'heat/tests') diff --git a/heat/tests/api/cfn/test_api_cfn_v1.py b/heat/tests/api/cfn/test_api_cfn_v1.py index 351b9a28c..e343afb71 100644 --- a/heat/tests/api/cfn/test_api_cfn_v1.py +++ b/heat/tests/api/cfn/test_api_cfn_v1.py @@ -163,13 +163,13 @@ class CfnStackControllerTest(common.HeatTestCase): u'StackStatus': u'CREATE_COMPLETE'}]}}} self.assertEqual(expected, result) default_args = {'limit': None, 'sort_keys': None, 'marker': None, - 'sort_dir': None, 'filters': None, 'tenant_safe': True, + 'sort_dir': None, 'filters': None, 'show_deleted': False, 'show_nested': False, 'show_hidden': False, 'tags': None, 'tags_any': None, 'not_tags': None, 'not_tags_any': None} mock_call.assert_called_once_with( - dummy_req.context, ('list_stacks', default_args), version='1.8') + dummy_req.context, ('list_stacks', default_args), version='1.33') @mock.patch.object(rpc_client.EngineClient, 'call') def test_list_rmt_aterr(self, mock_call): @@ -185,7 +185,7 @@ class CfnStackControllerTest(common.HeatTestCase): result = self.controller.list(dummy_req) self.assertIsInstance(result, exception.HeatInvalidParameterValueError) mock_call.assert_called_once_with( - dummy_req.context, ('list_stacks', mock.ANY), version='1.8') + dummy_req.context, ('list_stacks', mock.ANY), version='1.33') @mock.patch.object(rpc_client.EngineClient, 'call') def test_list_rmt_interr(self, mock_call): @@ -201,7 +201,7 @@ class CfnStackControllerTest(common.HeatTestCase): result = self.controller.list(dummy_req) self.assertIsInstance(result, exception.HeatInternalFailureError) mock_call.assert_called_once_with( - dummy_req.context, ('list_stacks', mock.ANY), version='1.8') + dummy_req.context, ('list_stacks', mock.ANY), version='1.33') def test_describe_last_updated_time(self): params = {'Action': 'DescribeStacks'} diff --git a/heat/tests/api/openstack_v1/test_stacks.py b/heat/tests/api/openstack_v1/test_stacks.py index 405877606..0a32ccad6 100644 --- a/heat/tests/api/openstack_v1/test_stacks.py +++ b/heat/tests/api/openstack_v1/test_stacks.py @@ -20,6 +20,7 @@ import webob.exc import heat.api.middleware.fault as fault import heat.api.openstack.v1.stacks as stacks +from heat.common import context from heat.common import exception as heat_exc from heat.common import identifier from heat.common import policy @@ -294,13 +295,13 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): } self.assertEqual(expected, result) default_args = {'limit': None, 'sort_keys': None, 'marker': None, - 'sort_dir': None, 'filters': None, 'tenant_safe': True, + 'sort_dir': None, 'filters': None, 'show_deleted': False, 'show_nested': False, 'show_hidden': False, 'tags': None, 'tags_any': None, 'not_tags': None, 'not_tags_any': None} mock_call.assert_called_once_with( - req.context, ('list_stacks', default_args), version='1.8') + req.context, ('list_stacks', default_args), version='1.33') @mock.patch.object(rpc_client.EngineClient, 'call') def test_index_whitelists_pagination_params(self, mock_call, mock_enforce): @@ -319,13 +320,12 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): rpc_call_args, _ = mock_call.call_args engine_args = rpc_call_args[1][1] - self.assertEqual(13, len(engine_args)) + self.assertEqual(12, len(engine_args)) self.assertIn('limit', engine_args) self.assertIn('sort_keys', engine_args) self.assertIn('marker', engine_args) self.assertIn('sort_dir', engine_args) self.assertIn('filters', engine_args) - self.assertIn('tenant_safe', engine_args) self.assertNotIn('balrog', engine_args) @mock.patch.object(rpc_client.EngineClient, 'call') @@ -463,17 +463,18 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): scope=self.controller.REQUEST_SCOPE, context=self.context) - def test_global_index_sets_tenant_safe_to_false(self, mock_enforce): + def test_global_index_uses_admin_context(self, mock_enforce): rpc_client = self.controller.rpc_client rpc_client.list_stacks = mock.Mock(return_value=[]) rpc_client.count_stacks = mock.Mock() + mock_admin_ctxt = self.patchobject(context, 'get_admin_context') params = {'global_tenant': 'True'} req = self._get('/stacks', params=params) self.controller.index(req, tenant_id=self.tenant) rpc_client.list_stacks.assert_called_once_with(mock.ANY, - filters=mock.ANY, - tenant_safe=False) + filters=mock.ANY) + self.assertEqual(1, mock_admin_ctxt.call_count) def test_global_index_show_deleted_false(self, mock_enforce): rpc_client = self.controller.rpc_client @@ -485,7 +486,6 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.controller.index(req, tenant_id=self.tenant) rpc_client.list_stacks.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_deleted=False) def test_global_index_show_deleted_true(self, mock_enforce): @@ -498,7 +498,6 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.controller.index(req, tenant_id=self.tenant) rpc_client.list_stacks.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_deleted=True) def test_global_index_show_nested_false(self, mock_enforce): @@ -511,7 +510,6 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.controller.index(req, tenant_id=self.tenant) rpc_client.list_stacks.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_nested=False) def test_global_index_show_nested_true(self, mock_enforce): @@ -524,7 +522,6 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.controller.index(req, tenant_id=self.tenant) rpc_client.list_stacks.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_nested=True) def test_index_show_deleted_True_with_count_True(self, mock_enforce): @@ -539,11 +536,9 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.assertEqual(0, result['count']) rpc_client.list_stacks.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_deleted=True) rpc_client.count_stacks.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_deleted=True, show_nested=False, show_hidden=False, @@ -607,13 +602,13 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.assertEqual(expected, result) default_args = {'limit': None, 'sort_keys': None, 'marker': None, - 'sort_dir': None, 'filters': None, 'tenant_safe': True, + 'sort_dir': None, 'filters': None, 'show_deleted': False, 'show_nested': False, 'show_hidden': False, 'tags': None, 'tags_any': None, 'not_tags': None, 'not_tags_any': None} mock_call.assert_called_once_with( - req.context, ('list_stacks', default_args), version='1.8') + req.context, ('list_stacks', default_args), version='1.33') @mock.patch.object(rpc_client.EngineClient, 'call') def test_index_rmt_aterr(self, mock_call, mock_enforce): @@ -629,7 +624,7 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.assertEqual(400, resp.json['code']) self.assertEqual('AttributeError', resp.json['error']['type']) mock_call.assert_called_once_with( - req.context, ('list_stacks', mock.ANY), version='1.8') + req.context, ('list_stacks', mock.ANY), version='1.33') def test_index_err_denied_policy(self, mock_enforce): self._mock_enforce_setup(mock_enforce, 'index', False) @@ -657,7 +652,7 @@ class StackControllerTest(tools.ControllerTest, common.HeatTestCase): self.assertEqual(500, resp.json['code']) self.assertEqual('Exception', resp.json['error']['type']) mock_call.assert_called_once_with( - req.context, ('list_stacks', mock.ANY), version='1.8') + req.context, ('list_stacks', mock.ANY), version='1.33') def test_create(self, mock_enforce): self._mock_enforce_setup(mock_enforce, 'create', True) diff --git a/heat/tests/api/openstack_v1/test_views_stacks_view.py b/heat/tests/api/openstack_v1/test_views_stacks_view.py index cbf904830..5f71c0fee 100644 --- a/heat/tests/api/openstack_v1/test_views_stacks_view.py +++ b/heat/tests/api/openstack_v1/test_views_stacks_view.py @@ -65,19 +65,19 @@ class TestFormatStack(common.HeatTestCase): self.assertNotIn('project', result) @mock.patch.object(stacks_view, 'util', new=mock.Mock()) - def test_doesnt_add_project_if_tenant_safe(self): + def test_doesnt_add_project_if_not_include_project(self): stack = {'stack_identity': {'stack_id': 'foo', 'tenant': 'bar'}} result = stacks_view.format_stack(self.request, stack, - None, tenant_safe=True) + None, include_project=False) self.assertNotIn('project', result) @mock.patch.object(stacks_view, 'util', new=mock.Mock()) - def test_adds_project_if_not_tenant_safe(self): + def test_adds_project_if_include_project(self): stack = {'stack_identity': {'stack_id': 'foo', 'tenant': 'bar'}} result = stacks_view.format_stack(self.request, stack, - None, tenant_safe=False) + None, include_project=True) self.assertIn('project', result) self.assertEqual('bar', result['project']) diff --git a/heat/tests/db/test_sqlalchemy_api.py b/heat/tests/db/test_sqlalchemy_api.py index db3d215ea..e388c4816 100644 --- a/heat/tests/db/test_sqlalchemy_api.py +++ b/heat/tests/db/test_sqlalchemy_api.py @@ -1827,10 +1827,6 @@ class DBAPIStackTest(common.HeatTestCase): def test_stack_get_can_return_a_stack_from_different_tenant(self): stack = create_stack(self.ctx, self.template, self.user_creds) self.ctx.tenant_id = 'abc' - ret_stack = db_api.stack_get(self.ctx, stack.id, - show_deleted=False, tenant_safe=False) - self.assertEqual(stack.id, ret_stack.id) - self.assertEqual('db_test_stack_name', ret_stack.name) # with ctx.is_admin = True self.ctx.is_admin = True @@ -1907,20 +1903,6 @@ class DBAPIStackTest(common.HeatTestCase): self.ctx.tenant = UUID3 self.assertEqual([], db_api.stack_get_all(self.ctx)) - def test_stack_get_all_with_tenant_safe_false(self): - values = [ - {'tenant': UUID1}, - {'tenant': UUID1}, - {'tenant': UUID2}, - {'tenant': UUID2}, - {'tenant': UUID2}, - ] - [create_stack(self.ctx, self.template, self.user_creds, - **val) for val in values] - - stacks = db_api.stack_get_all(self.ctx, tenant_safe=False) - self.assertEqual(5, len(stacks)) - def test_stack_get_all_with_admin_context(self): values = [ {'tenant': UUID1}, @@ -1953,7 +1935,7 @@ class DBAPIStackTest(common.HeatTestCase): self.ctx.tenant = UUID2 self.assertEqual(3, db_api.stack_count_all(self.ctx)) - def test_stack_count_all_with_tenant_safe_false(self): + def test_stack_count_all_with_admin_context(self): values = [ {'tenant': UUID1}, {'tenant': UUID1}, @@ -1963,9 +1945,9 @@ class DBAPIStackTest(common.HeatTestCase): ] [create_stack(self.ctx, self.template, self.user_creds, **val) for val in values] - + self.ctx.is_admin = True self.assertEqual(5, - db_api.stack_count_all(self.ctx, tenant_safe=False)) + db_api.stack_count_all(self.ctx)) def test_purge_deleted(self): now = timeutils.utcnow() @@ -2053,6 +2035,7 @@ class DBAPIStackTest(common.HeatTestCase): db_api.purge_deleted(age=3600, granularity='seconds') ctx = utils.dummy_context() + ctx.is_admin = True self.assertIsNotNone(db_api.stack_get(ctx, stacks[0].id, show_deleted=True)) self.assertIsNotNone(db_api.raw_template_get(ctx, templates[1].id)) @@ -2065,14 +2048,12 @@ class DBAPIStackTest(common.HeatTestCase): db_api.purge_deleted(age=3600, granularity='seconds', project_id=UUID1) self.assertIsNotNone(db_api.stack_get(ctx, stacks[0].id, - show_deleted=True, - tenant_safe=False)) + show_deleted=True)) self.assertIsNotNone(db_api.raw_template_get(ctx, templates[1].id)) db_api.purge_deleted(age=0, granularity='seconds', project_id=UUID2) self.assertIsNotNone(db_api.stack_get(ctx, stacks[0].id, - show_deleted=True, - tenant_safe=False)) + show_deleted=True)) self.assertIsNotNone(db_api.raw_template_get(ctx, templates[1].id)) def test_dont_purge_shared_raw_template_files(self): @@ -2140,16 +2121,15 @@ class DBAPIStackTest(common.HeatTestCase): def _deleted_stack_existance(self, ctx, stacks, tmpl_files, existing, deleted): + ctx.is_admin = True for s in existing: self.assertIsNotNone(db_api.stack_get(ctx, stacks[s].id, - show_deleted=True, - tenant_safe=False)) + show_deleted=True)) self.assertIsNotNone(db_api.raw_template_files_get( ctx, tmpl_files[s].files_id)) for s in deleted: self.assertIsNone(db_api.stack_get(ctx, stacks[s].id, - show_deleted=True, - tenant_safe=False)) + show_deleted=True)) rt_id = stacks[s].raw_template_id self.assertRaises(exception.NotFound, db_api.raw_template_get, ctx, rt_id) diff --git a/heat/tests/engine/service/test_service_engine.py b/heat/tests/engine/service/test_service_engine.py index 8a284e237..0aa2d41b3 100644 --- a/heat/tests/engine/service/test_service_engine.py +++ b/heat/tests/engine/service/test_service_engine.py @@ -40,7 +40,7 @@ class ServiceEngineTest(common.HeatTestCase): def test_make_sure_rpc_version(self): self.assertEqual( - '1.32', + '1.33', service.EngineService.RPC_API_VERSION, ('RPC version is changed, please update this test to new version ' 'and make sure additional test cases are added for RPC APIs ' diff --git a/heat/tests/engine/service/test_stack_watch.py b/heat/tests/engine/service/test_stack_watch.py index e7cb3d459..5e995d27e 100644 --- a/heat/tests/engine/service/test_stack_watch.py +++ b/heat/tests/engine/service/test_stack_watch.py @@ -54,7 +54,7 @@ class StackWatchTest(common.HeatTestCase): self.eng.thread_group_mgr = None self._create_periodic_tasks() - mock_get_all.assert_called_once_with(mock.ANY, tenant_safe=False, + mock_get_all.assert_called_once_with(mock.ANY, show_hidden=True) calls = start_watch_task.call_args_list self.assertEqual(2, start_watch_task.call_count) diff --git a/heat/tests/test_engine_service.py b/heat/tests/test_engine_service.py index 0db02a095..60a1bb0ab 100644 --- a/heat/tests/test_engine_service.py +++ b/heat/tests/test_engine_service.py @@ -494,7 +494,6 @@ class StackServiceTest(common.HeatTestCase): marker=marker, sort_dir=sort_dir, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -513,7 +512,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=filters, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -533,43 +531,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=translated, - tenant_safe=mock.ANY, - show_deleted=mock.ANY, - show_nested=mock.ANY, - show_hidden=mock.ANY, - tags=mock.ANY, - tags_any=mock.ANY, - not_tags=mock.ANY, - not_tags_any=mock.ANY) - - @mock.patch.object(stack_object.Stack, 'get_all') - def test_stack_list_tenant_safe_defaults_to_true(self, mock_stack_get_all): - self.eng.list_stacks(self.ctx) - mock_stack_get_all.assert_called_once_with(self.ctx, - limit=mock.ANY, - sort_keys=mock.ANY, - marker=mock.ANY, - sort_dir=mock.ANY, - filters=mock.ANY, - tenant_safe=True, - show_deleted=mock.ANY, - show_nested=mock.ANY, - show_hidden=mock.ANY, - tags=mock.ANY, - tags_any=mock.ANY, - not_tags=mock.ANY, - not_tags_any=mock.ANY) - - @mock.patch.object(stack_object.Stack, 'get_all') - def test_stack_list_passes_tenant_safe_info(self, mock_stack_get_all): - self.eng.list_stacks(self.ctx, tenant_safe=False) - mock_stack_get_all.assert_called_once_with(self.ctx, - limit=mock.ANY, - sort_keys=mock.ANY, - marker=mock.ANY, - sort_dir=mock.ANY, - filters=mock.ANY, - tenant_safe=False, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -587,7 +548,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=True, show_hidden=mock.ANY, @@ -605,7 +565,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=True, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -623,7 +582,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=True, @@ -641,7 +599,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -659,7 +616,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -677,7 +633,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -695,7 +650,6 @@ class StackServiceTest(common.HeatTestCase): marker=mock.ANY, sort_dir=mock.ANY, filters=mock.ANY, - tenant_safe=mock.ANY, show_deleted=mock.ANY, show_nested=mock.ANY, show_hidden=mock.ANY, @@ -709,35 +663,6 @@ class StackServiceTest(common.HeatTestCase): self.eng.count_stacks(self.ctx, filters={'foo': 'bar'}) mock_stack_count_all.assert_called_once_with(mock.ANY, filters={'foo': 'bar'}, - tenant_safe=mock.ANY, - show_deleted=False, - show_nested=False, - show_hidden=False, - tags=None, - tags_any=None, - not_tags=None, - not_tags_any=None) - - @mock.patch.object(stack_object.Stack, 'count_all') - def test_count_stacks_tenant_safe_default_true(self, mock_stack_count_all): - self.eng.count_stacks(self.ctx) - mock_stack_count_all.assert_called_once_with(mock.ANY, - filters=mock.ANY, - tenant_safe=True, - show_deleted=False, - show_nested=False, - show_hidden=False, - tags=None, - tags_any=None, - not_tags=None, - not_tags_any=None) - - @mock.patch.object(stack_object.Stack, 'count_all') - def test_count_stacks_passes_tenant_safe_info(self, mock_stack_count_all): - self.eng.count_stacks(self.ctx, tenant_safe=False) - mock_stack_count_all.assert_called_once_with(mock.ANY, - filters=mock.ANY, - tenant_safe=False, show_deleted=False, show_nested=False, show_hidden=False, @@ -751,7 +676,6 @@ class StackServiceTest(common.HeatTestCase): self.eng.count_stacks(self.ctx, show_nested=True) mock_stack_count_all.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_deleted=False, show_nested=True, show_hidden=False, @@ -765,7 +689,6 @@ class StackServiceTest(common.HeatTestCase): self.eng.count_stacks(self.ctx, show_deleted=True) mock_stack_count_all.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_deleted=True, show_nested=False, show_hidden=False, @@ -779,7 +702,6 @@ class StackServiceTest(common.HeatTestCase): self.eng.count_stacks(self.ctx, show_hidden=True) mock_stack_count_all.assert_called_once_with(mock.ANY, filters=mock.ANY, - tenant_safe=True, show_deleted=False, show_nested=False, show_hidden=True, @@ -1382,11 +1304,10 @@ class StackServiceTest(common.HeatTestCase): } mock_get_all.assert_called_once_with(self.ctx, filters=filters, - tenant_safe=False, show_nested=True) mock_get_by_id.assert_has_calls([ - mock.call(self.ctx, 'foo', tenant_safe=False), - mock.call(self.ctx, 'bar', tenant_safe=False), + mock.call(self.ctx, 'foo'), + mock.call(self.ctx, 'bar'), ]) mock_stack_load.assert_called_once_with(self.ctx, stack=db_stack, diff --git a/heat/tests/test_rpc_client.py b/heat/tests/test_rpc_client.py index 0a29759f4..2e3c7ad61 100644 --- a/heat/tests/test_rpc_client.py +++ b/heat/tests/test_rpc_client.py @@ -112,7 +112,6 @@ class EngineRpcAPITestCase(common.HeatTestCase): 'marker': mock.ANY, 'sort_dir': mock.ANY, 'filters': mock.ANY, - 'tenant_safe': mock.ANY, 'show_deleted': mock.ANY, 'show_nested': mock.ANY, 'show_hidden': mock.ANY, @@ -126,7 +125,6 @@ class EngineRpcAPITestCase(common.HeatTestCase): def test_count_stacks(self): default_args = { 'filters': mock.ANY, - 'tenant_safe': mock.ANY, 'show_deleted': mock.ANY, 'show_nested': mock.ANY, 'show_hidden': mock.ANY, @@ -306,8 +304,7 @@ class EngineRpcAPITestCase(common.HeatTestCase): def test_list_software_configs(self): self._test_engine_api('list_software_configs', 'call', - limit=mock.ANY, marker=mock.ANY, - tenant_safe=mock.ANY) + limit=mock.ANY, marker=mock.ANY) def test_show_software_config(self): self._test_engine_api('show_software_config', 'call', diff --git a/heat/tests/test_stack_lock.py b/heat/tests/test_stack_lock.py index a920f4698..d5bd512da 100644 --- a/heat/tests/test_stack_lock.py +++ b/heat/tests/test_stack_lock.py @@ -62,7 +62,6 @@ class StackLockTest(common.HeatTestCase): self.mock_get_by_id.assert_called_once_with( self.context, self.stack_id, - tenant_safe=False, show_deleted=True) mock_create.assert_called_once_with( self.context, self.stack_id, self.engine_id) @@ -97,7 +96,6 @@ class StackLockTest(common.HeatTestCase): self.mock_get_by_id.assert_called_once_with( self.context, self.stack_id, - tenant_safe=False, show_deleted=True) mock_create.assert_called_once_with( @@ -118,7 +116,6 @@ class StackLockTest(common.HeatTestCase): self.mock_get_by_id.assert_called_once_with( self.context, self.stack_id, - tenant_safe=False, show_deleted=True) mock_create.assert_called_once_with( @@ -160,7 +157,6 @@ class StackLockTest(common.HeatTestCase): self.mock_get_by_id.assert_called_with( self.context, self.stack_id, - tenant_safe=False, show_deleted=True) mock_create.assert_has_calls( -- cgit v1.2.1