Commit db0647dc authored by Iustin Pop's avatar Iustin Pop
Browse files

Merge branch 'devel-2.4'

* devel-2.4:
  Add support for cluster/OS parameters in QA
  Add OS search path to gnt-cluster info
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parents 35007011 5abecc1c
......@@ -363,6 +363,7 @@ def ShowClusterConfig(opts, args):
ToStdout(" - default instance allocator: %s", result["default_iallocator"])
ToStdout(" - primary ip version: %d", result["primary_ip_version"])
ToStdout(" - preallocation wipe disks: %s", result["prealloc_wipe_disks"])
ToStdout(" - OS search path: %s", utils.CommaJoin(constants.OS_SEARCH_PATH))
ToStdout("Default node parameters:")
_PrintGroupedParams(result["ndparams"], roman=opts.roman_integers)
......@@ -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",
......@@ -100,6 +100,30 @@ def TestClusterInit(rapi_user, rapi_secret):
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:
# 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"""
......@@ -245,6 +269,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"""
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