Commit 3601d488 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

QA: Support master-netdev and default NIC parameters

Requested in issue 337.

The parameter “bridge” was not documented and is therefore silently
replaced with “master-netdev”. A note is added to “qa-sample.json”
describing how comments work.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 78453739
{ {
"# Note:": null,
"# This file is stored in the JSON format and does not support": null,
"# comments. As a work-around, comments are keys starting with a hash": null,
"# sign (#).": null,
"name": "xen-test", "name": "xen-test",
"rename": "xen-test-rename", "rename": "xen-test-rename",
"enabled-hypervisors": "xen-pvm", "enabled-hypervisors": "xen-pvm",
...@@ -12,6 +17,15 @@ ...@@ -12,6 +17,15 @@
"os-hvp": {}, "os-hvp": {},
"primary_ip_version": 4, "primary_ip_version": 4,
"# Network interface for master role": null,
"#master-netdev": "xen-br0",
"# Default network interface parameters": null,
"#default-nicparams": {
"mode": "bridged",
"link": "xen-br0",
"os": "debian-etch", "os": "debian-etch",
"maxmem": "1024M", "maxmem": "1024M",
"minmem": "512M", "minmem": "512M",
...@@ -105,16 +105,21 @@ def TestClusterInit(rapi_user, rapi_secret): ...@@ -105,16 +105,21 @@ def TestClusterInit(rapi_user, rapi_secret):
"nic-count"): "nic-count"):
for spec_val in ("min", "max", "std"): for spec_val in ("min", "max", "std"):
spec = qa_config.get("ispec_%s_%s" % spec = qa_config.get("ispec_%s_%s" %
(spec_type.replace('-', '_'), spec_val), None) (spec_type.replace("-", "_"), spec_val), None)
if spec: if spec:
cmd.append("--specs-%s=%s=%d" % (spec_type, spec_val, spec)) cmd.append("--specs-%s=%s=%d" % (spec_type, spec_val, spec))
if master.get("secondary", None): if master.get("secondary", None):
cmd.append("--secondary-ip=%s" % master["secondary"]) cmd.append("--secondary-ip=%s" % master["secondary"])
bridge = qa_config.get("bridge", None) master_netdev = qa_config.get("master-netdev", None)
if bridge: if master_netdev:
cmd.append("--master-netdev=%s" % bridge) cmd.append("--master-netdev=%s" % master_netdev)
nicparams = qa_config.get("default-nicparams", None)
if nicparams:
cmd.append("--nic-parameters=%s" %
cmd.append(qa_config.get("name")) cmd.append(qa_config.get("name"))
AssertCommand(cmd) AssertCommand(cmd)
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