# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259578662 0
# Node ID b5bb8746201bcefa089ebb02a1c8674f76aed0b4
# Parent 5b724b482f37c89a8020e347127b0fa657aea05e
xend: fix bugs in c/s 20321:7a69f773548e "add a config description item for
each guest"
Signed-off-by: james song (wei)<jsong@xxxxxxxxxx>
---
tools/python/xen/xend/XendConfig.py | 8 +++++---
tools/python/xen/xend/XendDomainInfo.py | 1 +
tools/python/xen/xm/create.py | 5 +++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff -r 5b724b482f37 -r b5bb8746201b tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Mon Nov 30 10:54:20 2009 +0000
+++ b/tools/python/xen/xend/XendConfig.py Mon Nov 30 10:57:42 2009 +0000
@@ -127,6 +127,7 @@ XENAPI_CFG_TO_LEGACY_CFG = {
'actions_after_crash': 'on_crash',
'PV_bootloader': 'bootloader',
'PV_bootloader_args': 'bootloader_args',
+ 'Description': 'description',
}
LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(XENAPI_CFG_TO_LEGACY_CFG)
@@ -178,7 +179,6 @@ XENAPI_PLATFORM_CFG_TYPES = {
'pci_power_mgmt': int,
'xen_platform_pci': int,
"gfx_passthru": int,
- 'description': str,
'oos' : int,
}
@@ -275,6 +275,7 @@ LEGACY_CFG_TYPES = {
'rtc/timeoffset': str,
'bootloader': str,
'bootloader_args': str,
+ 'description': str,
}
# Values that should be stored in xenstore's /vm/<uuid> that is used
@@ -405,6 +406,7 @@ class XendConfig(dict):
'platform': {},
'target': 0,
'superpages': 0,
+ 'description': '',
}
return defaults
@@ -496,8 +498,6 @@ class XendConfig(dict):
self['platform']['xen_platform_pci'] = 1
if 'vpt_align' not in self['platform']:
self['platform']['vpt_align'] = 1
- if 'description' not in self['platform']:
- self['platform']['description'] = ''
if 'loader' not in self['platform']:
# Old configs may have hvmloader set as PV_kernel param
if self.has_key('PV_kernel') and self['PV_kernel'] != '':
@@ -876,6 +876,7 @@ class XendConfig(dict):
update_with('PV_bootloader', 'bootloader')
update_with('PV_bootloader_args', 'bootloader_args')
+ update_with('Description', 'description')
image_sxp = sxp.child_value(sxp_cfg, 'image', [])
if image_sxp:
@@ -966,6 +967,7 @@ class XendConfig(dict):
_set_cfg_if_exists('on_xend_start')
_set_cfg_if_exists('vcpu_avail')
_set_cfg_if_exists('change_home_server')
+ _set_cfg_if_exists('description')
# Parse and store runtime configuration
_set_cfg_if_exists('start_time')
diff -r 5b724b482f37 -r b5bb8746201b tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Nov 30 10:54:20 2009 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Mon Nov 30 10:57:42 2009 +0000
@@ -1667,6 +1667,7 @@ class XendDomainInfo:
'name': self.info['name_label'],
'console/limit': str(xoptions.get_console_limit() * 1024),
'memory/target': str(self.info['memory_dynamic_max'] / 1024),
+ 'description': str(self.info['description']),
}
def f(n, v):
diff -r 5b724b482f37 -r b5bb8746201b tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Mon Nov 30 10:54:20 2009 +0000
+++ b/tools/python/xen/xm/create.py Mon Nov 30 10:57:42 2009 +0000
@@ -997,7 +997,7 @@ def configure_hvm(config_image, vals):
args = [ 'acpi', 'apic',
'boot',
'cpuid', 'cpuid_check',
- 'description', 'device_model', 'display',
+ 'device_model', 'display',
'fda', 'fdb',
'gfx_passthru', 'guest_os_type',
'hap', 'hpet',
@@ -1058,7 +1058,8 @@ def make_config(vals):
'restart', 'on_poweroff', 'tsc_mode', 'nomigrate',
'on_reboot', 'on_crash', 'features', 'on_xend_start',
'on_xend_stop', 'target', 'cpuid', 'cpuid_check',
- 'machine_address_size', 'suppress_spurious_page_faults'])
+ 'machine_address_size', 'suppress_spurious_page_faults',
+ 'description'])
vcpu_conf()
if vals.uuid is not None:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|