Fix tests.

(cherry picked from commit 620d93634e)
This commit is contained in:
grossmj 2020-08-15 16:35:31 +09:30 committed by Bernhard Ehlers
parent ec02150fd2
commit f2ddef855f
2 changed files with 6 additions and 5 deletions

View File

@ -1788,7 +1788,8 @@ class QemuVM(BaseNode):
interface = getattr(self, "hd{}_disk_interface".format(drive)) interface = getattr(self, "hd{}_disk_interface".format(drive))
# fail-safe: use "ide" if there is a disk image and no interface type has been explicitly configured # fail-safe: use "ide" if there is a disk image and no interface type has been explicitly configured
if interface == "none": if interface == "none":
setattr(self, "hd{}_disk_interface".format(drive), "ide") interface = "ide"
setattr(self, "hd{}_disk_interface".format(drive), interface)
disk_name = "hd" + drive disk_name = "hd" + drive
if not os.path.isfile(disk_image) or not os.path.exists(disk_image): if not os.path.isfile(disk_image) or not os.path.exists(disk_image):

View File

@ -669,13 +669,13 @@ async def test_qemu_template_create(controller_api):
"default_name_format": "{name}-{0}", "default_name_format": "{name}-{0}",
"first_port_name": "", "first_port_name": "",
"hda_disk_image": "IOSvL2-15.2.4.0.55E.qcow2", "hda_disk_image": "IOSvL2-15.2.4.0.55E.qcow2",
"hda_disk_interface": "ide", "hda_disk_interface": "none",
"hdb_disk_image": "", "hdb_disk_image": "",
"hdb_disk_interface": "ide", "hdb_disk_interface": "none",
"hdc_disk_image": "", "hdc_disk_image": "",
"hdc_disk_interface": "ide", "hdc_disk_interface": "none",
"hdd_disk_image": "", "hdd_disk_image": "",
"hdd_disk_interface": "ide", "hdd_disk_interface": "none",
"initrd": "", "initrd": "",
"kernel_command_line": "", "kernel_command_line": "",
"kernel_image": "", "kernel_image": "",