WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Simplify code to map interfaces to bridge

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Simplify code to map interfaces to bridges
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Apr 2007 10:50:28 -0700
Delivery-date: Fri, 13 Apr 2007 11:22:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tom Wilkie <tom.wilkie@xxxxxxxxx>
# Date 1176461030 -3600
# Node ID 30898de092896411600a0eba120f73db0654b232
# Parent  abea8d1715038ee2721c3fad87b989338cac352f
Simplify code to map interfaces to bridges

signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xend/XendNode.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r abea8d171503 -r 30898de09289 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Fri Apr 13 11:28:04 2007 +0100
+++ b/tools/python/xen/xend/XendNode.py Fri Apr 13 11:43:50 2007 +0100
@@ -150,8 +150,10 @@ class XendNode:
                 
         # Get a mapping from interface to bridge
 
-        if_to_br = dict(reduce(lambda ls,(b,ifs):[(i,b) for i in ifs] + ls,
-                               Brctl.get_state().items(), []))
+        if_to_br = dict([(i,b)
+                         for (b,ifs) in Brctl.get_state().items()
+                         for i in ifs])
+
         # initialise PIFs
         saved_pifs = self.state_store.load_state('pif')
         if saved_pifs:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Simplify code to map interfaces to bridges, Xen patchbot-unstable <=