WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xm on xenapi: Enable more platform config

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm on xenapi: Enable more platform configurations
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jun 2008 03:40:10 -0700
Delivery-date: Tue, 10 Jun 2008 03:40:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213000567 -3600
# Node ID 0be5d3510305bb31c0d15d48850201c8b2089718
# Parent  b320cfe1f10f24bf2d92b9dca40d4999b919c40d
xm on xenapi: Enable more platform configurations

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
---
 tools/python/xen/xm/xenapi_create.py |   48 ++++++++++++++++++++++++++---------
 1 files changed, 37 insertions(+), 11 deletions(-)

diff -r b320cfe1f10f -r 0be5d3510305 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 09:36:07 2008 +0100
@@ -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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm on xenapi: Enable more platform configurations, Xen patchbot-unstable <=