ia64/xen-unstable

changeset 14546:eb52a7f22e72

Fix the VM.is_a_template flag for domain 0.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Mar 26 00:09:00 2007 +0100 (2007-03-26)
parents af07c7b01893
children 57becbbe1564
files tools/python/xen/xend/XendAPI.py tools/python/xen/xend/XendConfig.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Mon Mar 26 00:08:13 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Mon Mar 26 00:09:00 2007 +0100
     1.3 @@ -1546,7 +1546,7 @@ class XendAPI(object):
     1.4              'name_label': xeninfo.getName(),
     1.5              'name_description': xeninfo.getName(),
     1.6              'user_version': 1,
     1.7 -            'is_a_template': xeninfo.info.get('is_a_template'),
     1.8 +            'is_a_template': xeninfo.info['is_a_template'],
     1.9              'auto_power_on': False,
    1.10              'resident_on': XendNode.instance().uuid,
    1.11              'memory_static_min': xeninfo.get_memory_static_min(),
    1.12 @@ -1576,7 +1576,7 @@ class XendAPI(object):
    1.13              'tools_version': xeninfo.get_tools_version(),
    1.14              'other_config': xeninfo.info.get('other_config', {}),
    1.15              'domid': domid is None and -1 or domid,
    1.16 -            'is_control_domain': xeninfo == xendom.privilegedDomain(),
    1.17 +            'is_control_domain': xeninfo.info['is_control_domain'],
    1.18              'metrics': xeninfo.get_metrics()
    1.19          }
    1.20          return xen_api_success(record)
     2.1 --- a/tools/python/xen/xend/XendConfig.py	Mon Mar 26 00:08:13 2007 +0100
     2.2 +++ b/tools/python/xen/xend/XendConfig.py	Mon Mar 26 00:09:00 2007 +0100
     2.3 @@ -298,6 +298,8 @@ class XendConfig(dict):
     2.4              'actions_after_reboot': 'restart',
     2.5              'actions_after_crash': 'restart',
     2.6              'actions_after_suspend': '',
     2.7 +            'is_template': False,
     2.8 +            'is_control_domain': False,
     2.9              'features': '',
    2.10              'PV_bootloader': '',
    2.11              'PV_kernel': '',
     3.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Mar 26 00:08:13 2007 +0100
     3.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Mar 26 00:09:00 2007 +0100
     3.3 @@ -127,6 +127,8 @@ def recreate(info, priv):
     3.4      assert not info['dying']
     3.5  
     3.6      xeninfo = XendConfig.XendConfig(dominfo = info)
     3.7 +    xeninfo['is_control_domain'] = priv
     3.8 +    xeninfo['is_a_template'] = False
     3.9      domid = xeninfo['domid']
    3.10      uuid1 = uuid.fromString(xeninfo['uuid'])
    3.11      needs_reinitialising = False