diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-10-10 17:25:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-10-10 17:25:50 +0000 |
| commit | 9125dfe007aaaad9a3f276ebcde8c451c0193c25 (patch) | |
| tree | 259ecc451aae21b5635c3dae51c6164cf5be13e9 /nova/tests | |
| parent | c1e5e3352a71cc61ba9e7dba0d9048d8b766e2c0 (diff) | |
| parent | 800c08dfe36de52429364f96d708fb3bba0c4e3b (diff) | |
Merge "Add util for disk type retrieval"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/fake_libvirt_utils.py | 5 | ||||
| -rw-r--r-- | nova/tests/test_libvirt.py | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/nova/tests/fake_libvirt_utils.py b/nova/tests/fake_libvirt_utils.py index 378515ac0..1862521c1 100644 --- a/nova/tests/fake_libvirt_utils.py +++ b/nova/tests/fake_libvirt_utils.py @@ -21,6 +21,7 @@ import StringIO files = {} disk_sizes = {} disk_backing_files = {} +disk_type = "qcow2" def get_iscsi_initiator(): @@ -39,6 +40,10 @@ def get_disk_backing_file(path): return disk_backing_files.get(path, None) +def get_disk_type(path): + return disk_type + + def copy_image(src, dest): pass diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 05873bd79..8861eb8de 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -1162,6 +1162,7 @@ class LibvirtConnTestCase(test.TestCase): libvirt_driver.LibvirtDriver._conn.lookupByName = self.fake_lookup self.mox.StubOutWithMock(libvirt_driver.utils, 'execute') libvirt_driver.utils.execute = self.fake_execute + self.stubs.Set(libvirt_driver.libvirt_utils, 'disk_type', 'raw') self.mox.ReplayAll() |
