Remove utils.execute() from the hyperv driver.

Change-Id: I2e47b214baec4dbe6657976d1807c0d0710f8f62
This commit is contained in:
Michael Still 2018-11-26 15:11:14 +11:00
parent 225aa87721
commit 1292fd52ff
2 changed files with 10 additions and 10 deletions

View File

@ -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,

View File

@ -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