[Libvirt-cim] [PATCH 1 of 3] [TEST] update network_by_bridge in live.py for KVM & XenFV support

Guo Lian Yun yunguol at cn.ibm.com
Mon Apr 21 06:20:36 UTC 2008


# HG changeset patch
# User Guolian Yun <yunguol at cn.ibm.com>
# Date 1208758537 25200
# Node ID c5d39cec5989977b3c2bff149044b8d005272ea4
# Parent  0d31dff13ae341fd6515dc844ee98c7b5300b71d
[TEST] update network_by_bridge in live.py for KVM & XenFV support

Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>

diff -r 0d31dff13ae3 -r c5d39cec5989 lib/VirtLib/live.py
--- a/lib/VirtLib/live.py	Fri Apr 18 17:00:16 2008 +0800
+++ b/lib/VirtLib/live.py	Sun Apr 20 23:15:37 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




More information about the Libvirt-cim mailing list