ia64/xen-unstable

changeset 19281:6c7ae9c859f5

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
author Keir Fraser <keir.fraser@citrix.com>
date Fri Mar 06 18:56:28 2009 +0000 (2009-03-06)
parents 728d8dee880b
children ec671455fb05
files tools/xm-test/lib/XmTestLib/NetConfig.py
line diff
     1.1 --- a/tools/xm-test/lib/XmTestLib/NetConfig.py	Fri Mar 06 18:55:05 2009 +0000
     1.2 +++ b/tools/xm-test/lib/XmTestLib/NetConfig.py	Fri Mar 06 18:56:28 2009 +0000
     1.3 @@ -57,11 +57,13 @@ def getXendNetConfig():
     1.4      while val[0] != 'network-script':
     1.5          val = pin.get_val()
     1.6  
     1.7 -    if val[1] == "network-bridge":
     1.8 +    # split network command into script name and its parameters
     1.9 +    sub_val = val[1].split()
    1.10 +    if sub_val[0] == "network-bridge":
    1.11          netenv = "bridge"
    1.12 -    elif val[1] == "network-route":
    1.13 +    elif sub_val[0] == "network-route":
    1.14          netenv = "route"
    1.15 -    elif val[1] == "network-nat":
    1.16 +    elif sub_val[0] == "network-nat":
    1.17          netenv = "nat"
    1.18      else:
    1.19          raise NetworkError("Failed to get network env from xend config")