# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1208399302 -28800
# Node ID 2b19d0a1450ea8df5598a79ff56996145cbfb58f
# Parent 2977c29bb772fb764004aad004e4ff7c43264f38
[TEST] .3# update network_by_bridge for KVM & XenFV support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 2977c29bb772 -r 2b19d0a1450e lib/VirtLib/live.py
--- a/lib/VirtLib/live.py Wed Apr 16 10:49:55 2008 +0800
+++ b/lib/VirtLib/live.py Thu Apr 17 10:28:22 2008 +0800
@@ -301,15 +301,15 @@
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