Commit 0a6301ae authored by Helga Velroyen's avatar Helga Velroyen
Browse files

QA: Fix error regarding missing names of disk configs

This fixes an error in case there are no disk names in the QA config
(which was the case till recently). Right now, QA tries to use 'None'
as disk name and that makes instance creation fail.
Signed-off-by: default avatarHelga Velroyen <>
Reviewed-by: default avatarKlaus Aehlig <>
parent aeefb4cd
......@@ -55,7 +55,10 @@ def _GetGenericAddParameters(inst, disk_template, force_mac=None):
for idx, disk in enumerate(qa_config.GetDiskOptions()):
size = disk.get("size")
name = disk.get("name")
params.extend(["--disk", "%s:size=%s,name=%s" % (idx, size, name)])
diskparams = "%s:size=%s" % (idx, size)
if name:
diskparams += ",name=%s" % name
params.extend(["--disk", diskparams])
# Set static MAC address if configured
if force_mac:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment