Since the RAPI QA suite doesn't seem to offer easy testing of failed
creations, I didn't add this to the QA. Pointers on how to do it are
welcome.
The patch also changes the 'os' argument to be required, since that is
how the LU expects it, and without it we just fail later instead of
directly at submission time.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
return opcodes.OpCreateInstance(
mode=baserlib.CheckParameter(data, "mode"),
instance_name=baserlib.CheckParameter(data, "name"),
return opcodes.OpCreateInstance(
mode=baserlib.CheckParameter(data, "mode"),
instance_name=baserlib.CheckParameter(data, "name"),
- os_type=baserlib.CheckParameter(data, "os", default=None),
+ os_type=baserlib.CheckParameter(data, "os"),
+ osparams=baserlib.CheckParameter(data, "osparams", default={}),
force_variant=baserlib.CheckParameter(data, "force_variant",
default=False),
pnode=baserlib.CheckParameter(data, "pnode", default=None),
force_variant=baserlib.CheckParameter(data, "force_variant",
default=False),
pnode=baserlib.CheckParameter(data, "pnode", default=None),
"nics": nics,
"mode": mode,
"disk_template": disk_template,
"nics": nics,
"mode": mode,
"disk_template": disk_template,
}
if beparams is not None:
}
if beparams is not None:
"disks": [],
"nics": [],
"mode": constants.INSTANCE_CREATE,
"disks": [],
"nics": [],
"mode": constants.INSTANCE_CREATE,
- "disk_template": constants.DT_PLAIN
+ "disk_template": constants.DT_PLAIN,
+ "os": "debootstrap",
}
for name in reqfields.keys():
}
for name in reqfields.keys():