summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem@us.ibm.com>2014-08-18 18:42:06 -0700
committerMatt Riedemann <mriedem@us.ibm.com>2014-08-18 18:44:55 -0700
commit269e27356c5cc70249d0419cb0e6e5449632a2b9 (patch)
tree52729ae4f29381c38c4561947ba43742c442acfd
parent9c9e44e111abafde1e05a5e38f7e1645ec8ba6df (diff)
downloadnova-269e27356c5cc70249d0419cb0e6e5449632a2b9.tar.gz
Add test for get_instance_disk_info to test_virt_drivers
Commit 2bed16c89356554a193a111d268a9587709ed2f7 added get_instance_disk_info to the base ComputeDriver class but didn't add a test for it in test_virt_drivers, so it's added here. This also fixes the wrong method signature in the fake virt driver. Note that this wouldn't have found the problem for the hyperv or vmware drivers due to bug 1209421. Change-Id: I5765720d8c3e0a7962b493fa49359514f3136544 Related-Bug: #1358719
-rw-r--r--nova/tests/virt/test_virt_drivers.py7
-rw-r--r--nova/virt/fake.py2
2 files changed, 8 insertions, 1 deletions
diff --git a/nova/tests/virt/test_virt_drivers.py b/nova/tests/virt/test_virt_drivers.py
index 9212807ac5..2657618334 100644
--- a/nova/tests/virt/test_virt_drivers.py
+++ b/nova/tests/virt/test_virt_drivers.py
@@ -735,6 +735,13 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase):
self.assertRaises(NotImplementedError, self.connection.set_bootable,
'instance', True)
+ @catch_notimplementederror
+ def test_get_instance_disk_info(self):
+ # This should be implemented by any driver that supports live migrate.
+ instance_ref, network_info = self._get_running_instance()
+ self.connection.get_instance_disk_info(instance_ref['name'],
+ block_device_info={})
+
class AbstractDriverTestCase(_VirtDriverTestCase, test.TestCase):
def setUp(self):
diff --git a/nova/virt/fake.py b/nova/virt/fake.py
index 1032614c60..6e7549f00a 100644
--- a/nova/virt/fake.py
+++ b/nova/virt/fake.py
@@ -395,7 +395,7 @@ class FakeDriver(driver.ComputeDriver):
def ensure_filtering_rules_for_instance(self, instance_ref, network_info):
return
- def get_instance_disk_info(self, instance_name):
+ def get_instance_disk_info(self, instance_name, block_device_info=None):
return
def live_migration(self, context, instance_ref, dest,