Commit 558e2e8a authored by Michael Hanselmann's avatar Michael Hanselmann Committed by Guido Trotter

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.

This is a cherry-pick of master commit
3601d488Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent cbf5114e
{
"# 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",
"rename": "xen-test-rename",
"enabled-hypervisors": "xen-pvm",
......@@ -12,6 +17,15 @@
"os-hvp": {},
"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",
"maxmem": "1024M",
"minmem": "512M",
......
......@@ -104,16 +104,21 @@ def TestClusterInit(rapi_user, rapi_secret):
"nic-count"):
for spec_val in ("min", "max", "std"):
spec = qa_config.get("ispec_%s_%s" %
(spec_type.replace('-', '_'), spec_val), None)
(spec_type.replace("-", "_"), spec_val), None)
if spec:
cmd.append("--specs-%s=%s=%d" % (spec_type, spec_val, spec))
if master.get("secondary", None):
cmd.append("--secondary-ip=%s" % master["secondary"])
bridge = qa_config.get("bridge", None)
if bridge:
cmd.append("--master-netdev=%s" % bridge)
master_netdev = qa_config.get("master-netdev", None)
if master_netdev:
cmd.append("--master-netdev=%s" % master_netdev)
nicparams = qa_config.get("default-nicparams", None)
if nicparams:
cmd.append("--nic-parameters=%s" %
",".join(utils.FormatKeyValue(nicparams)))
cmd.append(qa_config.get("name"))
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