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
This commit is contained in:
Michał Dulko 2016-02-29 14:25:54 +01:00
parent 4d093d4eca
commit 6a4e3f5758
2 changed files with 14 additions and 4 deletions

View File

@ -584,6 +584,20 @@ class VolumeRpcAPITestCase(test.TestCase):
volume=self.fake_volume, volume=self.fake_volume,
version='1.17') 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): def test_create_consistencygroup_from_src_cgsnapshot(self):
self._test_volume_api('create_consistencygroup_from_src', self._test_volume_api('create_consistencygroup_from_src',
rpc_method='cast', rpc_method='cast',

View File

@ -331,10 +331,6 @@ class VolumeAPI(rpc.RPCAPI):
return cctxt.call(ctxt, 'failover_host', return cctxt.call(ctxt, 'failover_host',
secondary_backend_id=secondary_backend_id) 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): def manage_existing_snapshot(self, ctxt, snapshot, ref, host):
cctxt = self._get_cctxt(host, '1.28') cctxt = self._get_cctxt(host, '1.28')
cctxt.cast(ctxt, 'manage_existing_snapshot', cctxt.cast(ctxt, 'manage_existing_snapshot',