Merge "Remove unused _disk_qcow2_to_raw"

This commit is contained in:
Zuul
2018-06-11 06:08:40 +00:00
committed by Gerrit Code Review
2 changed files with 0 additions and 21 deletions
@@ -17982,19 +17982,6 @@ class LibvirtDriverTestCase(test.NoDBTestCase):
mock_rename.assert_has_calls([
mock.call(_path_qcow, path)])
@mock.patch('nova.utils.execute')
@mock.patch('os.rename')
def test_disk_qcow2_to_raw(self, mock_rename, mock_execute):
path = '/test/disk'
_path_raw = path + '_raw'
self.drvr._disk_qcow2_to_raw(path)
mock_execute.assert_has_calls([
mock.call('qemu-img', 'convert', '-f', 'qcow2',
'-O', 'raw', path, _path_raw)])
mock_rename.assert_has_calls([
mock.call(_path_raw, path)])
@mock.patch.object(libvirt_driver.LibvirtDriver, '_inject_data')
@mock.patch.object(libvirt_driver.LibvirtDriver, 'get_info')
@mock.patch.object(libvirt_driver.LibvirtDriver,
-8
View File
@@ -8223,14 +8223,6 @@ class LibvirtDriver(driver.ComputeDriver):
'-O', 'qcow2', path, path_qcow)
os.rename(path_qcow, path)
@staticmethod
def _disk_qcow2_to_raw(path):
"""Converts a qcow2 disk to raw."""
path_raw = path + '_raw'
utils.execute('qemu-img', 'convert', '-f', 'qcow2',
'-O', 'raw', path, path_raw)
os.rename(path_raw, path)
def finish_migration(self, context, migration, instance, disk_info,
network_info, image_meta, resize_instance,
block_device_info=None, power_on=True):