Skip to content
Snippets Groups Projects
Commit 5abecc1c authored by Iustin Pop's avatar Iustin Pop
Browse files

Add support for cluster/OS parameters in QA


Currently there is no way to QA with (for example) an initrd because
the QA only inits the cluster with the default parameters. This makes
it impossible to QA using anything but the default parameters, which
doesn't always work.

Additionally, we add OS parameters and OS hypervisor parameters, for
completeness and for testing that these commands also work.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent f36c3e2d
No related merge requests found
......@@ -2,6 +2,14 @@
"name": "xen-test",
"rename": "xen-test-rename",
"enabled-hypervisors": "xen-pvm",
"# Dict of hypervisor name and parameters (like on the cmd line)": null,
"hypervisor-parameters": {},
"# Backend parameters (like on the cmd line)": null,
"backend-parameters": "",
"# Dict of OS name and parameters (like on the cmd line)": null,
"os-parameters": {},
"# Dict of OS name and value dict of hypervisor parameters": null,
"os-hvp": {},
"primary_ip_version": 4,
"os": "debian-etch",
......
......@@ -96,6 +96,30 @@ def TestClusterInit(rapi_user, rapi_secret):
AssertCommand(cmd)
cmd = ["gnt-cluster", "modify"]
# hypervisor parameter modifications
hvp = qa_config.get("hypervisor-parameters", {})
for k, v in hvp.items():
cmd.extend(["-H", "%s:%s" % (k, v)])
# backend parameter modifications
bep = qa_config.get("backend-parameters", "")
if bep:
cmd.extend(["-B", bep])
if len(cmd) > 2:
AssertCommand(cmd)
# OS parameters
osp = qa_config.get("os-parameters", {})
for k, v in osp.items():
AssertCommand(["gnt-os", "modify", "-O", v, k])
# OS hypervisor parameters
os_hvp = qa_config.get("os-hvp", {})
for os_name in os_hvp:
for hv, hvp in os_hvp[os_name].items():
AssertCommand(["gnt-os", "modify", "-H", "%s:%s" % (hv, hvp), os_name])
def TestClusterRename():
"""gnt-cluster rename"""
......@@ -206,6 +230,10 @@ def TestClusterModifyBe():
]:
AssertCommand(cmd, fail=fail)
# redo the original-requested BE parameters, if any
bep = qa_config.get("backend-parameters", "")
if bep:
AssertCommand(["gnt-cluster", "modify", "-B", bep])
def TestClusterInfo():
"""gnt-cluster info"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment