Merge "Remove utils.execute() from the hyperv driver."
This commit is contained in:
commit
0b9f634de2
|
@ -935,7 +935,7 @@ class VMOpsTestCase(test_base.HyperVBaseTestCase):
|
|||
|
||||
@mock.patch('nova.api.metadata.base.InstanceMetadata')
|
||||
@mock.patch('nova.virt.configdrive.ConfigDriveBuilder')
|
||||
@mock.patch('nova.utils.execute')
|
||||
@mock.patch('oslo_concurrency.processutils.execute')
|
||||
def _test_create_config_drive(self, mock_execute, mock_ConfigDriveBuilder,
|
||||
mock_InstanceMetadata, config_drive_format,
|
||||
config_drive_cdrom, side_effect,
|
||||
|
|
|
@ -677,15 +677,15 @@ class VMOps(object):
|
|||
if not CONF.hyperv.config_drive_cdrom:
|
||||
configdrive_path = self._pathutils.get_configdrive_path(
|
||||
instance.name, constants.DISK_FORMAT_VHD, rescue=rescue)
|
||||
utils.execute(CONF.hyperv.qemu_img_cmd,
|
||||
'convert',
|
||||
'-f',
|
||||
'raw',
|
||||
'-O',
|
||||
'vpc',
|
||||
configdrive_path_iso,
|
||||
configdrive_path,
|
||||
attempts=1)
|
||||
processutils.execute(CONF.hyperv.qemu_img_cmd,
|
||||
'convert',
|
||||
'-f',
|
||||
'raw',
|
||||
'-O',
|
||||
'vpc',
|
||||
configdrive_path_iso,
|
||||
configdrive_path,
|
||||
attempts=1)
|
||||
self._pathutils.remove(configdrive_path_iso)
|
||||
else:
|
||||
configdrive_path = configdrive_path_iso
|
||||
|
|
Loading…
Reference in New Issue