Change the RPC parameter
The arg name in restore_backup of backup rpcapi is volume_host, but actually we use backup.host. This is very easy to misunderstand, so just change it to backup_host. Change-Id: I3dbd21981a67bedb389ce12ac083c501073e846a
This commit is contained in:
parent
821cc703c0
commit
59ed2b400d
|
@ -58,9 +58,9 @@ class BackupAPI(rpc.RPCAPI):
|
|||
cctxt = self._get_cctxt(server=backup.host)
|
||||
cctxt.cast(ctxt, 'create_backup', backup=backup)
|
||||
|
||||
def restore_backup(self, ctxt, volume_host, backup, volume_id):
|
||||
def restore_backup(self, ctxt, backup_host, backup, volume_id):
|
||||
LOG.debug("restore_backup in rpcapi backup_id %s", backup.id)
|
||||
cctxt = self._get_cctxt(server=volume_host)
|
||||
cctxt = self._get_cctxt(server=backup_host)
|
||||
cctxt.cast(ctxt, 'restore_backup', backup=backup,
|
||||
volume_id=volume_id)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class BackupRPCAPITestCase(test.RPCAPITestCase):
|
|||
self._test_rpc_api('restore_backup',
|
||||
rpc_method='cast',
|
||||
server='fake_volume_host',
|
||||
volume_host='fake_volume_host',
|
||||
backup_host='fake_volume_host',
|
||||
backup=self.fake_backup_obj,
|
||||
volume_id=fake.VOLUME_ID)
|
||||
|
||||
|
|
Loading…
Reference in New Issue