The ispecs were previously passed as multiple parameters to gnt-cluster
init, which did not yield the desired result. This patch changes this
behavior and passes the min/std/max values in one parameter.

Signed-off-by: Thomas Thrainer <[email protected]>
Reviewed-by: Klaus Aehlig <[email protected]>

(cherry picked from commit 6383059dd5afabe5445b12ba5d8609d0f13ba1b7)

Signed-off-by: Thomas Thrainer <[email protected]>
---
 qa/qa_cluster.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py
index 9baed56..fc332b8 100644
--- a/qa/qa_cluster.py
+++ b/qa/qa_cluster.py
@@ -191,11 +191,14 @@ def TestClusterInit(rapi_user, rapi_secret):
 
   for spec_type in ("mem-size", "disk-size", "disk-count", "cpu-count",
                     "nic-count"):
+    spec_values = []
     for spec_val in ("min", "max", "std"):
       spec = qa_config.get("ispec_%s_%s" %
                            (spec_type.replace("-", "_"), spec_val), None)
       if spec is not None:
-        cmd.append("--specs-%s=%s=%d" % (spec_type, spec_val, spec))
+        spec_values.append("%s=%d" % (spec_val, spec))
+    if spec_values:
+      cmd.append("--specs-%s=%s" % (spec_type, ",".join(spec_values)))
 
   if master.secondary:
     cmd.append("--secondary-ip=%s" % master.secondary)
-- 
1.9.1.423.g4596e3a

Reply via email to