From: Juergen Gross Subject: [Patch] xm-test NetConfig.py error Date: Fri, 06 Mar 2009 08:56:52 +0100 Message-ID: <49B0D744.5090709@fujitsu-siemens.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040808080206080104020305" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------040808080206080104020305 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, 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) Juergen -- Juergen Gross Principal Developer IP SW OS6 Telephone: +49 (0) 89 636 47950 Fujitsu Siemens Computers e-mail: juergen.gross@fujitsu-siemens.com Otto-Hahn-Ring 6 Internet: www.fujitsu-siemens.com D-81739 Muenchen Company details: www.fujitsu-siemens.com/imprint.html --------------040808080206080104020305 Content-Type: text/x-patch; name="NetConfig.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="NetConfig.patch" 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 # HG changeset patch # User juergen.gross@fujitsu-siemens.com # Date 1236325568 -3600 # Node ID 6315b66fbd5b25597ad2aa766aeda68d6852205d # Parent 7f573cb76db41a9fc46052867b02e9e0c107aa86 diff -r 7f573cb76db4 -r 6315b66fbd5b tools/xm-test/lib/XmTestLib/NetConfig.py --- a/tools/xm-test/lib/XmTestLib/NetConfig.py Tue Mar 03 13:22:28 2009 +0000 +++ b/tools/xm-test/lib/XmTestLib/NetConfig.py Fri Mar 06 08:46:08 2009 +0100 @@ -57,11 +57,13 @@ 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") --------------040808080206080104020305 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------040808080206080104020305--