]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Clean up replication v2.1 (Cheesecake) RPC API
authorMichał Dulko <michal.dulko@intel.com>
Mon, 29 Feb 2016 13:25:54 +0000 (14:25 +0100)
committerMichał Dulko <michal.dulko@intel.com>
Mon, 29 Feb 2016 13:38:31 +0000 (14:38 +0100)
We've merged replication v2.1 (Cheesecake) code with two little issues
in RPC API layer:

 * volume.rcpapi have list_replication_targets method, which is unused
   and not handled by volume.manager.
 * There are no tests for new methods in test_volume_rpcapi module.

This commit sorts this out.

Change-Id: I2ba6ee68e1e729c9d391a846941ae6bdbbefbc9b
Related-Blueprint: replication-update

cinder/tests/unit/test_volume_rpcapi.py
cinder/volume/rpcapi.py

index 3f923cdea48b7da3f3a59d9f5f808310ad4ec9f8..2cafef66bc9cbe2e70e6f48e6ab9980a36e4497b 100644 (file)
@@ -584,6 +584,20 @@ class VolumeRpcAPITestCase(test.TestCase):
                               volume=self.fake_volume,
                               version='1.17')
 
+    def test_freeze_host(self):
+        self._test_volume_api('freeze_host', rpc_method='call',
+                              host='fake_host', version='1.39')
+
+    def test_thaw_host(self):
+        self._test_volume_api('thaw_host', rpc_method='call', host='fake_host',
+                              version='1.39')
+
+    def test_failover_host(self):
+        self._test_volume_api('failover_host', rpc_method='call',
+                              host='fake_host',
+                              secondary_backend_id='fake_backend',
+                              version='1.39')
+
     def test_create_consistencygroup_from_src_cgsnapshot(self):
         self._test_volume_api('create_consistencygroup_from_src',
                               rpc_method='cast',
index 3967f71f2d7b093216ef39d6e505655dd2ef39c7..78a0b18053068141426823f4b2793c41a87b9fec 100644 (file)
@@ -331,10 +331,6 @@ class VolumeAPI(rpc.RPCAPI):
         return cctxt.call(ctxt, 'failover_host',
                           secondary_backend_id=secondary_backend_id)
 
-    def list_replication_targets(self, ctxt, host):
-        cctxt = self._get_cctxt(host, '1.39')
-        return cctxt.call(ctxt, 'list_replication_targets')
-
     def manage_existing_snapshot(self, ctxt, snapshot, ref, host):
         cctxt = self._get_cctxt(host, '1.28')
         cctxt.cast(ctxt, 'manage_existing_snapshot',