ia64/xen-unstable

changeset 14669:a5a2c49eda68

Managed HVM guests are not displayed by 'xm list' after restarting xend.
This patch prevents writing empty configuration items to the domain's
sexpr configuration file. Without the empty items, the sexpr is
parsed properly when xend is started.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
author Jim Fehlig <jfehlig@novell.com>
date Tue Mar 13 18:13:11 2007 -0600 (2007-03-13)
parents 9981a42c8054
children 7ea36c7d6521
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Thu Mar 29 14:27:46 2007 -0700
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue Mar 13 18:13:11 2007 -0600
     1.3 @@ -730,7 +730,7 @@ class XendConfig(dict):
     1.4              
     1.5              for key in XENAPI_PLATFORM_CFG:
     1.6                  val = sxp.child_value(image_sxp, key, None)
     1.7 -                if val is not None:
     1.8 +                if val is not None and val != '':
     1.9                      self['platform'][key] = val
    1.10              
    1.11              notes = sxp.children(image_sxp, 'notes')
    1.12 @@ -1359,7 +1359,7 @@ class XendConfig(dict):
    1.13  
    1.14          for key in XENAPI_PLATFORM_CFG:
    1.15              val = sxp.child_value(image_sxp, key, None)
    1.16 -            if val is not None:
    1.17 +            if val is not None and val != '':
    1.18                  self['platform'][key] = val
    1.19  
    1.20          notes = sxp.children(image_sxp, 'notes')