From f309e5190062f938e0fdcc14b433c87d858b52de Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Mon, 17 Sep 2012 13:11:59 +1200 Subject: [PATCH] Use stack_identity where it has changed from stack_name. This is causing my test_rpcapi to fail. Also, attempt to enable test_rpcapi by setting @attr(tag=['unit', 'rpcapi']) Change-Id: Ie831ddddaccc4245a18e5bc754cbf413cea65741 --- heat/engine/rpcapi.py | 6 +++--- heat/tests/test_rpcapi.py | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/heat/engine/rpcapi.py b/heat/engine/rpcapi.py index 6e0b672a61..15b038f898 100644 --- a/heat/engine/rpcapi.py +++ b/heat/engine/rpcapi.py @@ -75,7 +75,7 @@ class EngineAPI(heat.openstack.common.rpc.proxy.RpcProxy): The show_stack method returns the attributes of one stack. :param ctxt: RPC context. - :param stack_name: Name of the stack you want to see, + :param stack_identity: Name of the stack you want to see, or None to see all :param params: Dict of http request parameters passed in from API side. """ @@ -149,7 +149,7 @@ class EngineAPI(heat.openstack.common.rpc.proxy.RpcProxy): The delete_stack method deletes a given stack. :param ctxt: RPC context. - :param stack_name: Name of the stack you want to delete. + :param stack_identity: Name of the stack you want to delete. :param params: Params passed from API. """ rpc_method = self.cast if cast else self.call @@ -162,7 +162,7 @@ class EngineAPI(heat.openstack.common.rpc.proxy.RpcProxy): The list_events method lists all events associated with a given stack. :param ctxt: RPC context. - :param stack_name: Name of the stack you want to get events for. + :param stack_identity: Name of the stack you want to get events for. :param params: Params passed from API. """ return self.call(ctxt, self.make_msg('list_events', diff --git a/heat/tests/test_rpcapi.py b/heat/tests/test_rpcapi.py index 2d02337e21..b3d40de08e 100644 --- a/heat/tests/test_rpcapi.py +++ b/heat/tests/test_rpcapi.py @@ -20,6 +20,7 @@ Unit Tests for heat.engine.rpcapi import stubout +from nose.plugins.attrib import attr import unittest from heat.common import config @@ -29,6 +30,7 @@ from heat.openstack.common import cfg from heat.openstack.common import rpc +@attr(tag=['unit', 'rpcapi']) class EngineRpcAPITestCase(unittest.TestCase): def setUp(self): @@ -85,7 +87,7 @@ class EngineRpcAPITestCase(unittest.TestCase): self.assertEqual(arg, expected_arg) def test_show_stack(self): - self._test_engine_api('show_stack', 'call', stack_name='wordpress', + self._test_engine_api('show_stack', 'call', stack_identity='wordpress', params={'Action': 'ListStacks'}) def test_create_stack(self): @@ -95,7 +97,8 @@ class EngineRpcAPITestCase(unittest.TestCase): args={'timeout_mins': u'30'}) def test_update_stack(self): - self._test_engine_api('update_stack', 'call', stack_name='wordpress', + self._test_engine_api('update_stack', 'call', + stack_identity='wordpress', template={u'Foo': u'bar'}, params={u'InstanceType': u'm1.xlarge'}, args={}) @@ -106,34 +109,34 @@ class EngineRpcAPITestCase(unittest.TestCase): def test_get_template(self): self._test_engine_api('get_template', 'call', - stack_name='wordpress', params={}) + stack_identity='wordpress', params={}) def test_delete_stack_cast(self): self._test_engine_api('delete_stack', 'cast', - stack_name='wordpress', params={}) + stack_identity='wordpress', params={}) def test_delete_stack_call(self): self._test_engine_api('delete_stack', 'call', - stack_name='wordpress', params={}) + stack_identity='wordpress', params={}) def test_list_events(self): self._test_engine_api('list_events', 'call', - stack_name='wordpress', params={}) + stack_identity='wordpress', params={}) def test_describe_stack_resource(self): self._test_engine_api('describe_stack_resource', 'call', - stack_name='wordpress', + stack_identity='wordpress', resource_name='LogicalResourceId') def test_describe_stack_resources(self): self._test_engine_api('describe_stack_resources', 'call', - stack_name='wordpress', + stack_identity='wordpress', physical_resource_id=u'404d-a85b-5315293e67de', logical_resource_id=u'WikiDatabase') def test_list_stack_resources(self): self._test_engine_api('list_stack_resources', 'call', - stack_name='wordpress') + stack_identity='wordpress') def test_metadata_list_stacks(self): self._test_engine_api('metadata_list_stacks', 'call')