From 6a4e3f57585eb0065700db5906335f605d1f55f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Dulko?= Date: Mon, 29 Feb 2016 14:25:54 +0100 Subject: [PATCH] Clean up replication v2.1 (Cheesecake) RPC API 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 | 14 ++++++++++++++ cinder/volume/rpcapi.py | 4 ---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cinder/tests/unit/test_volume_rpcapi.py b/cinder/tests/unit/test_volume_rpcapi.py index 3f923cdea..2cafef66b 100644 --- a/cinder/tests/unit/test_volume_rpcapi.py +++ b/cinder/tests/unit/test_volume_rpcapi.py @@ -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', diff --git a/cinder/volume/rpcapi.py b/cinder/volume/rpcapi.py index 3967f71f2..78a0b1805 100644 --- a/cinder/volume/rpcapi.py +++ b/cinder/volume/rpcapi.py @@ -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', -- 2.45.2