diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py index 5ac3713a5104d25c28f885f3eabeb9493f2a8991..f06f5f8b5bd8dfe91fafb13dbf79ffddc5ca16d6 100644 --- a/lib/client/gnt_cluster.py +++ b/lib/client/gnt_cluster.py @@ -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) diff --git a/qa/qa-sample.json b/qa/qa-sample.json index 27d058de9e318158c6065028f0ccf78f6c7c549d..d7f4f3ade349a4a9847d687e91ff35b9587d9b5d 100644 --- a/qa/qa-sample.json +++ b/qa/qa-sample.json @@ -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", diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py index b531d5ccecbc28f0e0b8919b915f716c98d34ed2..bfda23674505602eb7cec7da713ac736b23d9e3b 100644 --- a/qa/qa_cluster.py +++ b/qa/qa_cluster.py @@ -100,6 +100,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""" @@ -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"""