ia64/xen-unstable
changeset 17793:0be5d3510305
xm on xenapi: Enable more platform configurations
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Jun 09 09:36:07 2008 +0100 (2008-06-09) |
parents | b320cfe1f10f |
children | 9126c09738da |
files | tools/python/xen/xm/xenapi_create.py |
line diff
1.1 --- a/tools/python/xen/xm/xenapi_create.py Thu Jun 05 13:04:07 2008 +0100 1.2 +++ b/tools/python/xen/xm/xenapi_create.py Mon Jun 09 09:36:07 2008 +0100 1.3 @@ -821,17 +821,43 @@ class sxp2xml: 1.4 1.5 1.6 def extract_platform(self, image, document): 1.7 - platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', 1.8 - 'hap', 'hpet'] 1.9 1.10 - def extract_platform_key(key): 1.11 - platform = document.createElement("platform") 1.12 - platform.attributes["key"] = key 1.13 - platform.attributes["value"] \ 1.14 - = str(get_child_by_name(image, key, "1")) 1.15 - return platform 1.16 - 1.17 - return map(extract_platform_key, platform_keys) 1.18 + platform_keys = [ 1.19 + 'acpi', 1.20 + 'apic', 1.21 + 'boot', 1.22 + 'device_model', 1.23 + 'loader', 1.24 + 'fda', 1.25 + 'fdb', 1.26 + 'keymap', 1.27 + 'isa', 1.28 + 'localtime', 1.29 + 'monitor', 1.30 + 'pae', 1.31 + 'rtc_timeoffset', 1.32 + 'serial', 1.33 + 'soundhw', 1.34 + 'stdvga', 1.35 + 'usb', 1.36 + 'usbdevice', 1.37 + 'hpet', 1.38 + 'timer_mode', 1.39 + 'vhpt', 1.40 + 'guest_os_type', 1.41 + 'hap', 1.42 + ] 1.43 + 1.44 + platform_configs = [] 1.45 + for key in platform_keys: 1.46 + value = get_child_by_name(image, key, None) 1.47 + if value is not None: 1.48 + platform = document.createElement("platform") 1.49 + platform.attributes["key"] = key 1.50 + platform.attributes["value"] = str(value) 1.51 + platform_configs.append(platform) 1.52 + 1.53 + return platform_configs 1.54 1.55 def getFreshEthDevice(self): 1.56 self._eths += 1