]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Use stack_identity where it has changed from stack_name.
authorSteve Baker <sbaker@redhat.com>
Mon, 17 Sep 2012 01:11:59 +0000 (13:11 +1200)
committerSteve Baker <sbaker@redhat.com>
Mon, 17 Sep 2012 02:15:26 +0000 (14:15 +1200)
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
heat/tests/test_rpcapi.py

index 6e0b672a61c11e871e3ea9dac0c13006480a7169..15b038f898b0cd32e83c4b3bff6674c5ebeb2270 100644 (file)
@@ -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',
index 2d02337e2104157049f06712ef38504eec4fad7c..b3d40de08e871eb9022da25b82b6ba4c6e598b18 100644 (file)
@@ -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')