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

Guo Lian Yun yunguol at cn.ibm.com
Wed Apr 16 07:11:51 UTC 2008


# HG changeset patch
# User Guolian Yun <yunguol at cn.ibm.com>
# Date 1208329373 25200
# Node ID dfe0e517e9903fa49f31ade82117d4341c829e0b
# Parent  dfa2a9c819bd026cc467fb3bced05211ee4f2ba9
[TEST] update network_by_bridge for KVM & XenFV support

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

diff -r dfa2a9c819bd -r dfe0e517e990 lib/VirtLib/live.py
--- a/lib/VirtLib/live.py	Tue Apr 15 15:00:01 2008 +0800
+++ b/lib/VirtLib/live.py	Wed Apr 16 00:02:53 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