diff --git a/cinder/backup/rpcapi.py b/cinder/backup/rpcapi.py index 0988fc7cdbc..923ebc5b4d4 100644 --- a/cinder/backup/rpcapi.py +++ b/cinder/backup/rpcapi.py @@ -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) diff --git a/cinder/tests/unit/backup/test_rpcapi.py b/cinder/tests/unit/backup/test_rpcapi.py index 5d6c6f88f8f..e61bdd48927 100644 --- a/cinder/tests/unit/backup/test_rpcapi.py +++ b/cinder/tests/unit/backup/test_rpcapi.py @@ -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)