summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/tests/test_xenapi.py7
-rwxr-xr-xnova/virt/xenapi/driver.py4
-rw-r--r--nova/virt/xenapi/vmops.py1
3 files changed, 7 insertions, 5 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py
index cc71ba31e..2a484d832 100644
--- a/nova/tests/test_xenapi.py
+++ b/nova/tests/test_xenapi.py
@@ -2677,9 +2677,10 @@ class XenAPILiveMigrateTestCase(stubs.XenAPITestBase):
'destination_sr_ref': None,
'migrate_send_data': None
}}
- self.conn.check_can_live_migrate_source(self.context,
- {'host': 'host'},
- dest_check_data)
+ result = self.conn.check_can_live_migrate_source(self.context,
+ {'host': 'host'},
+ dest_check_data)
+ self.assertEqual(dest_check_data, result)
def test_check_can_live_migrate_source_with_block_migrate_fails(self):
stubs.stubout_session(self.stubs,
diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py
index c1a578f3b..6a1cdd6b9 100755
--- a/nova/virt/xenapi/driver.py
+++ b/nova/virt/xenapi/driver.py
@@ -452,8 +452,8 @@ class XenAPIDriver(driver.ComputeDriver):
:param dest_check_data: result of check_can_live_migrate_destination
includes the block_migration flag
"""
- self._vmops.check_can_live_migrate_source(ctxt, instance_ref,
- dest_check_data)
+ return self._vmops.check_can_live_migrate_source(ctxt, instance_ref,
+ dest_check_data)
def get_instance_disk_info(self, instance_name):
"""Used by libvirt for live migration. We rely on xenapi
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
index 5fca96817..5dbadc416 100644
--- a/nova/virt/xenapi/vmops.py
+++ b/nova/virt/xenapi/vmops.py
@@ -1640,6 +1640,7 @@ class VMOps(object):
try:
self._call_live_migrate_command(
"VM.assert_can_migrate", vm_ref, migrate_data)
+ return dest_check_data
except self._session.XenAPI.Failure as exc:
LOG.exception(exc)
raise exception.MigrationError(_('VM.assert_can_migrate'