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: Add PVFB support in xenapi_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm on xenapi: Add PVFB support in xenapi_create.py.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jun 2008 08:50:13 -0700
Delivery-date: Tue, 10 Jun 2008 08:50:27 -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 1213102231 -3600
# Node ID d77214a97e0408e320ab67beb5f884e63bf35b6b
# Parent  189597fbb8825fbeab758fdf49e31ec76af68102
xm on xenapi: Add PVFB support in xenapi_create.py.

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

diff -r 189597fbb882 -r d77214a97e04 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Tue Jun 10 13:49:54 2008 +0100
+++ b/tools/python/xen/xm/xenapi_create.py      Tue Jun 10 13:50:31 2008 +0100
@@ -518,6 +518,9 @@ class sxp2xml:
         vtpms_sxp = map(lambda x: x[1], [device for device in devices
                                          if device[1][0] == "vtpm"])
 
+        vfbs_sxp = map(lambda x: x[1], [device for device in devices
+                                        if device[1][0] == "vfb"])
+
         # Create XML Document
         
         impl = getDOMImplementation()
@@ -656,6 +659,10 @@ class sxp2xml:
         consoles = self.extract_consoles(image, document)
 
         map(vm.appendChild, consoles)
+
+        vfbs = map(lambda vfb: self.extract_vfb(vfb, document), vfbs_sxp)
+
+        map(vm.appendChild, vfbs)
 
         # Platform variables...
 
@@ -773,6 +780,46 @@ class sxp2xml:
              = get_child_by_name(vtpm_sxp, "backend", "0")
 
         return vtpm
+
+    def extract_vfb(self, vfb_sxp, document):
+
+        vfb = document.createElement("console")
+        vfb.attributes["protocol"] = "rfb"
+
+        if get_child_by_name(vfb_sxp, "type", "") == "vnc":
+            vfb.appendChild(self.mk_other_config(
+                "type", "vnc",
+                document))
+            vfb.appendChild(self.mk_other_config(
+                "vncunused", get_child_by_name(vfb_sxp, "vncunused", "1"),
+                document))
+            vfb.appendChild(self.mk_other_config(
+                "vnclisten",
+                get_child_by_name(vfb_sxp, "vnclisten", "127.0.0.1"),
+                document))
+            vfb.appendChild(self.mk_other_config(
+                "vncdisplay", get_child_by_name(vfb_sxp, "vncdisplay", "0"),
+                document))
+            vfb.appendChild(self.mk_other_config(
+                "vncpasswd", get_child_by_name(vfb_sxp, "vncpasswd", ""),
+                document))
+
+        if get_child_by_name(vfb_sxp, "type", "") == "sdl":
+            vfb.appendChild(self.mk_other_config(
+                "type", "sdl",
+                document))
+            vfb.appendChild(self.mk_other_config(
+                "display", get_child_by_name(vfb_sxp, "display", ""),
+                document))
+            vfb.appendChild(self.mk_other_config(
+                "xauthority",
+                get_child_by_name(vfb_sxp, "xauthority", ""),
+                document))
+            vfb.appendChild(self.mk_other_config(
+                "opengl", get_child_by_name(vfb_sxp, "opengl", "1"),
+                document))
+
+        return vfb
 
     _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: Add PVFB support in xenapi_create.py., Xen patchbot-unstable <=