# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1209458658 25200
# Node ID ce8e273d35c82934f64f1e53db5f9eab916c9edf
# Parent 2b83c1992dfc44573ba0c00729e36311355807ad
[TEST] add virt option in network_by_bridge function
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 2b83c1992dfc -r ce8e273d35c8 lib/VirtLib/live.py
--- a/lib/VirtLib/live.py Sun Apr 27 19:22:03 2008 -0700
+++ b/lib/VirtLib/live.py Tue Apr 29 01:44:18 2008 -0700
@@ -301,15 +301,15 @@ def get_bridge_from_network_xml(network,
if len(bridge) > 1:
return bridge[1]
-def network_by_bridge(bridge, server):
+def network_by_bridge(bridge, server, virt="Xen"):
"""Function returns virtual network for a given
bridge"""
- networks = net_list(server)
+ networks = net_list(server, virt)
if len(networks) == 0:
return None
for network in networks:
- if bridge == get_bridge_from_network_xml(network, server):
+ if bridge == get_bridge_from_network_xml(network, server, virt):
return network
return None
Show replies by date