aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-03-06 18:56:28 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-03-06 18:56:28 +0000
commit7468faf8d3780f4bc4789703f4bd8d7466438f98 (patch)
treed7cf0068228b761e5be54640048841b3ae154fd5 /tools/xm-test
parentadfb6cc3c048f4580e4925fcbcf32ef2565972e4 (diff)
downloadxen-7468faf8d3780f4bc4789703f4bd8d7466438f98.tar.gz
xen-7468faf8d3780f4bc4789703f4bd8d7466438f98.tar.bz2
xen-7468faf8d3780f4bc4789703f4bd8d7466438f98.zip
xm-test: Identifying the network env specified in xend config fails,
if an additional parameter is given for the network-bridge (e.g. netdev=eth1) The patch splits the network command into the command name and its parameters to determine the netenv (bridge, route, nat) Signed-off-by: juergen.gross@fujitsu-siemens.com
Diffstat (limited to 'tools/xm-test')
-rw-r--r--tools/xm-test/lib/XmTestLib/NetConfig.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/xm-test/lib/XmTestLib/NetConfig.py b/tools/xm-test/lib/XmTestLib/NetConfig.py
index 0c39969806..857a9a5cca 100644
--- a/tools/xm-test/lib/XmTestLib/NetConfig.py
+++ b/tools/xm-test/lib/XmTestLib/NetConfig.py
@@ -57,11 +57,13 @@ def getXendNetConfig():
while val[0] != 'network-script':
val = pin.get_val()
- if val[1] == "network-bridge":
+ # split network command into script name and its parameters
+ sub_val = val[1].split()
+ if sub_val[0] == "network-bridge":
netenv = "bridge"
- elif val[1] == "network-route":
+ elif sub_val[0] == "network-route":
netenv = "route"
- elif val[1] == "network-nat":
+ elif sub_val[0] == "network-nat":
netenv = "nat"
else:
raise NetworkError("Failed to get network env from xend config")