Merge "Replace cluster object's host with service_topic_queue"

This commit is contained in:
Zuul 2018-05-09 13:29:54 +00:00 committed by Gerrit Code Review
commit f6cad81789
1 changed files with 8 additions and 8 deletions

View File

@ -169,7 +169,7 @@ class VolumeAPI(rpc.RPCAPI):
@rpc.assert_min_rpc_version('3.15')
def revert_to_snapshot(self, ctxt, volume, snapshot):
version = self._compat_ver('3.15')
cctxt = self._get_cctxt(volume.host, version)
cctxt = self._get_cctxt(volume.service_topic_queue, version)
cctxt.cast(ctxt, 'revert_to_snapshot', volume=volume,
snapshot=snapshot)
@ -290,7 +290,7 @@ class VolumeAPI(rpc.RPCAPI):
def update_migrated_volume(self, ctxt, volume, new_volume,
original_volume_status):
cctxt = self._get_cctxt(new_volume['host'])
cctxt = self._get_cctxt(new_volume.service_topic_queue)
cctxt.call(ctxt, 'update_migrated_volume',
volume=volume,
new_volume=new_volume,
@ -434,7 +434,7 @@ class VolumeAPI(rpc.RPCAPI):
@rpc.assert_min_rpc_version('3.9')
def attachment_update(self, ctxt, vref, connector, attachment_id):
version = self._compat_ver('3.9')
cctxt = self._get_cctxt(vref.host, version=version)
cctxt = self._get_cctxt(vref.service_topic_queue, version=version)
return cctxt.call(ctxt,
'attachment_update',
vref=vref,
@ -444,7 +444,7 @@ class VolumeAPI(rpc.RPCAPI):
@rpc.assert_min_rpc_version('3.9')
def attachment_delete(self, ctxt, attachment_id, vref):
version = self._compat_ver('3.9')
cctxt = self._get_cctxt(vref.host, version=version)
cctxt = self._get_cctxt(vref.service_topic_queue, version=version)
return cctxt.call(ctxt,
'attachment_delete',
attachment_id=attachment_id,
@ -472,26 +472,26 @@ class VolumeAPI(rpc.RPCAPI):
@rpc.assert_min_rpc_version('3.14')
def enable_replication(self, ctxt, group):
cctxt = self._get_cctxt(group.host, version='3.14')
cctxt = self._get_cctxt(group.service_topic_queue, version='3.14')
cctxt.cast(ctxt, 'enable_replication',
group=group)
@rpc.assert_min_rpc_version('3.14')
def disable_replication(self, ctxt, group):
cctxt = self._get_cctxt(group.host, version='3.14')
cctxt = self._get_cctxt(group.service_topic_queue, version='3.14')
cctxt.cast(ctxt, 'disable_replication',
group=group)
@rpc.assert_min_rpc_version('3.14')
def failover_replication(self, ctxt, group, allow_attached_volume=False,
secondary_backend_id=None):
cctxt = self._get_cctxt(group.host, version='3.14')
cctxt = self._get_cctxt(group.service_topic_queue, version='3.14')
cctxt.cast(ctxt, 'failover_replication',
group=group, allow_attached_volume=allow_attached_volume,
secondary_backend_id=secondary_backend_id)
@rpc.assert_min_rpc_version('3.14')
def list_replication_targets(self, ctxt, group):
cctxt = self._get_cctxt(group.host, version='3.14')
cctxt = self._get_cctxt(group.service_topic_queue, version='3.14')
return cctxt.call(ctxt, 'list_replication_targets',
group=group)