From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: [PATCH] XM on XenAPI: Enable More Platform Configurations Date: Mon, 09 Jun 2008 15:28:53 +0900 Message-ID: <484CCDA5.90105@ab.jp.nec.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080803010005060908070601" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080803010005060908070601 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit With this patch, many platform configurations (such as 'boot', 'keymap', 'usb', etc) can be passed through xenapi when creating a domain. Regards, ----------------------- Yosuke Iwamatsu NEC Corporation --------------080803010005060908070601 Content-Type: all/allfiles; name="xm_xenapi_platform.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xm_xenapi_platform.patch" xm on xenapi: Enable more platform configurations Signed-off-by: Yosuke Iwamatsu diff -r b320cfe1f10f tools/python/xen/xm/xenapi_create.py --- a/tools/python/xen/xm/xenapi_create.py Thu Jun 05 13:04:07 2008 +0100 +++ b/tools/python/xen/xm/xenapi_create.py Mon Jun 09 14:41:28 2008 +0900 @@ -821,17 +821,43 @@ class sxp2xml: def extract_platform(self, image, document): - platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', - 'hap', 'hpet'] - - def extract_platform_key(key): - platform = document.createElement("platform") - platform.attributes["key"] = key - platform.attributes["value"] \ - = str(get_child_by_name(image, key, "1")) - return platform - - return map(extract_platform_key, platform_keys) + + platform_keys = [ + 'acpi', + 'apic', + 'boot', + 'device_model', + 'loader', + 'fda', + 'fdb', + 'keymap', + 'isa', + 'localtime', + 'monitor', + 'pae', + 'rtc_timeoffset', + 'serial', + 'soundhw', + 'stdvga', + 'usb', + 'usbdevice', + 'hpet', + 'timer_mode', + 'vhpt', + 'guest_os_type', + 'hap', + ] + + platform_configs = [] + for key in platform_keys: + value = get_child_by_name(image, key, None) + if value is not None: + platform = document.createElement("platform") + platform.attributes["key"] = key + platform.attributes["value"] = str(value) + platform_configs.append(platform) + + return platform_configs def getFreshEthDevice(self): self._eths += 1 --------------080803010005060908070601 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080803010005060908070601--