QA: Support additional arguments for initialization
authorMichael Hanselmann <hansmi@google.com>
Thu, 7 Feb 2013 13:15:36 +0000 (14:15 +0100)
committerMichael Hanselmann <hansmi@google.com>
Tue, 12 Feb 2013 12:05:17 +0000 (13:05 +0100)
In some scenarios it can be useful to add more arguments to “gnt-cluster
init”, such as “--no-drbd-storage”, if DRBD is not installed.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

qa/qa-sample.json
qa/qa_cluster.py

index a79d05c..501da9d 100644 (file)
@@ -24,6 +24,9 @@
   "# Cluster-level value of the exclusive-storage flag": null,
   "exclusive-storage": null,
 
+  "# Additional arguments for initializing cluster": null,
+  "cluster-init-args": [],
+
   "# Network interface for master role": null,
   "#master-netdev": "xen-br0",
 
index ffb0971..83a713e 100644 (file)
@@ -209,7 +209,12 @@ def TestClusterInit(rapi_user, rapi_secret):
     e_s = False
   qa_config.SetExclusiveStorage(e_s)
 
+  extra_args = qa_config.get("cluster-init-args")
+  if extra_args:
+    cmd.extend(extra_args)
+
   cmd.append(qa_config.get("name"))
+
   AssertCommand(cmd)
 
   cmd = ["gnt-cluster", "modify"]