Add call to vol driver when accepting a transfer
Some back-ends have the notion of tenancy on volumes and set ownership in the driver. The update of the DB alone when doing volume transfers isn't enough, we need to be able to propogate the update info all the way down to the driver level. This patch introduces the volume api/manger/rpc calls and implements a stub in the base driver that can be over-ridden for those that need to take some action. Change-Id: Ica6ae368084c44b32af5d08df14bb3745f3a37ee
This commit is contained in:
@@ -38,6 +38,7 @@ class VolumeAPI(cinder.openstack.common.rpc.proxy.RpcProxy):
|
||||
1.3 - Pass all image metadata (not just ID) in copy_volume_to_image
|
||||
1.4 - Add request_spec, filter_properties and
|
||||
allow_reschedule arguments to create_volume().
|
||||
1.5 - Add accept_transfer
|
||||
'''
|
||||
|
||||
BASE_RPC_API_VERSION = '1.0'
|
||||
@@ -128,3 +129,10 @@ class VolumeAPI(cinder.openstack.common.rpc.proxy.RpcProxy):
|
||||
def publish_service_capabilities(self, ctxt):
|
||||
self.fanout_cast(ctxt, self.make_msg('publish_service_capabilities'),
|
||||
version='1.2')
|
||||
|
||||
def accept_transfer(self, ctxt, volume):
|
||||
self.cast(ctxt,
|
||||
self.make_msg('accept_transfer',
|
||||
volume_id=volume['id']),
|
||||
topic=rpc.queue_get_for(ctxt, self.topic, volume['host']),
|
||||
version='1.5')
|
||||
|
||||
Reference in New Issue
Block a user