ia64/xen-unstable

changeset 14846:30898de09289

Simplify code to map interfaces to bridges

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Tom Wilkie <tom.wilkie@gmail.com>
date Fri Apr 13 11:43:50 2007 +0100 (2007-04-13)
parents abea8d171503
children 0b14423e75f8
files tools/python/xen/xend/XendNode.py
line diff
     1.1 --- a/tools/python/xen/xend/XendNode.py	Fri Apr 13 11:28:04 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendNode.py	Fri Apr 13 11:43:50 2007 +0100
     1.3 @@ -150,8 +150,10 @@ class XendNode:
     1.4                  
     1.5          # Get a mapping from interface to bridge
     1.6  
     1.7 -        if_to_br = dict(reduce(lambda ls,(b,ifs):[(i,b) for i in ifs] + ls,
     1.8 -                               Brctl.get_state().items(), []))
     1.9 +        if_to_br = dict([(i,b)
    1.10 +                         for (b,ifs) in Brctl.get_state().items()
    1.11 +                         for i in ifs])
    1.12 +
    1.13          # initialise PIFs
    1.14          saved_pifs = self.state_store.load_state('pif')
    1.15          if saved_pifs: