ia64/xen-unstable

changeset 14931:0b4375cd7e16

Translate network uuid to bridge name and store it in XendConfig when createing a new vif.

Fixes a bug where a new vif gets added to the wrong bridge.

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Tom Wilkie <tom.wilkie@gmail.com>
date Wed Apr 25 13:44:37 2007 +0100 (2007-04-25)
parents 33e22185002a
children 2b994e23f96b
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Wed Apr 25 13:50:20 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Wed Apr 25 13:44:37 2007 +0100
     1.3 @@ -341,7 +341,7 @@ class XendConfig(dict):
     1.4      # try and 'fix it up' but acutually fix the cause ;-)
     1.5      #
     1.6      def _memory_sanity_check(self):
     1.7 -        log.debug("_memory_sanity_check memory_static_min: %s, "
     1.8 +        log.trace("_memory_sanity_check memory_static_min: %s, "
     1.9                        "memory_static_max: %i, "
    1.10                        "memory_dynamic_min: %i, " 
    1.11                        "memory_dynamic_max: %i",
    1.12 @@ -1049,6 +1049,11 @@ class XendConfig(dict):
    1.13                      dev_info['type'] = cfg_xenapi.get('type')
    1.14                  if cfg_xenapi.get('name'):
    1.15                      dev_info['name'] = cfg_xenapi.get('name')
    1.16 +                if cfg_xenapi.get('network'):
    1.17 +                    from xen.xend.XendNode import XendAPIInstanceStore
    1.18 +                    network = XendAPIInstanceStore.get(
    1.19 +                        cfg_xenapi.get('network'), 'network')
    1.20 +                    dev_info['bridge'] = network.get_name_label()
    1.21                  
    1.22                  dev_uuid = cfg_xenapi.get('uuid', None)
    1.23                  if not dev_uuid: