direct-io.hg

changeset 7547:03612b7f69d5

Don't use XendRoot.get_vif_bridge to provide a default bridge -- instead, pass
no bridge parameter and let the vif-bridge script find one for itself.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Sun Oct 30 13:45:06 2005 +0100 (2005-10-30)
parents 601ae1c4fe61
children 9f44b2aa98f3
files tools/python/xen/xend/server/netif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/netif.py	Sun Oct 30 13:42:30 2005 +0100
     1.2 +++ b/tools/python/xen/xend/server/netif.py	Sun Oct 30 13:45:06 2005 +0100
     1.3 @@ -51,22 +51,22 @@ class NetifController(DevController):
     1.4          script = os.path.join(xroot.network_script_dir,
     1.5                                sxp.child_value(config, 'script',
     1.6                                                xroot.get_vif_script()))
     1.7 -        bridge = sxp.child_value(config, 'bridge',
     1.8 -                                 xroot.get_vif_bridge())
     1.9 -        mac = sxp.child_value(config, 'mac')
    1.10 +        bridge = sxp.child_value(config, 'bridge')
    1.11 +        mac    = sxp.child_value(config, 'mac')
    1.12          ipaddr = _get_config_ipaddr(config)
    1.13  
    1.14          devid = self.allocateDeviceID()
    1.15  
    1.16          back = { 'script' : script,
    1.17 -                 'mac' : mac,
    1.18 -                 'bridge' : bridge,
    1.19 +                 'mac'    : mac,
    1.20                   'handle' : "%i" % devid }
    1.21          if ipaddr:
    1.22              back['ip'] = ' '.join(ipaddr)
    1.23 +        if bridge:
    1.24 +            back['bridge'] = bridge
    1.25  
    1.26          front = { 'handle' : "%i" % devid,
    1.27 -                  'mac' : mac }
    1.28 +                  'mac'    : mac }
    1.29  
    1.30          return (devid, back, front)
    1.31