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] Write the xfb configuration details to th

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Write the xfb configuration details to the store, rather than storing them in
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 17 Dec 2006 17:50:09 -0800
Delivery-date: Sun, 17 Dec 2006 17:50:52 -0800
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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1166400057 0
# Node ID a7da43e10ab38a0540b50062a34e747d11d77dd7
# Parent  c700f2346f9c7f3b436d102af37570bf8b7c9a95
Write the xfb configuration details to the store, rather than storing them in
memory.  This ensures that the VM can be rebooted after a xend restart.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/vfbif.py |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff -r c700f2346f9c -r a7da43e10ab3 tools/python/xen/xend/server/vfbif.py
--- a/tools/python/xen/xend/server/vfbif.py     Sun Dec 17 23:59:08 2006 +0000
+++ b/tools/python/xen/xend/server/vfbif.py     Mon Dec 18 00:00:57 2006 +0000
@@ -13,6 +13,9 @@ def spawn_detached(path, args, env):
     else:
         os.waitpid(p, 0)
         
+CONFIG_ENTRIES = ['type', 'vncdisplay', 'vnclisten', 'vncpasswd', 'vncunused',
+                  'display', 'xauthority']
+
 class VfbifController(DevController):
     """Virtual frame buffer controller. Handles all vfb devices for a domain.
     Note that we only support a single vfb per domain at the moment.
@@ -20,24 +23,27 @@ class VfbifController(DevController):
 
     def __init__(self, vm):
         DevController.__init__(self, vm)
-        self.config = {}
         
     def getDeviceDetails(self, config):
         """@see DevController.getDeviceDetails"""
-        devid = 0
-        back = {}
-        front = {}
-        return (devid, back, front)
+
+        back = dict([(k, config[k]) for k in CONFIG_ENTRIES
+                     if config.has_key(k)])
+
+        return (0, back, {})
+
 
     def getDeviceConfiguration(self, devid):
-        r = DevController.getDeviceConfiguration(self, devid)
-        for (k,v) in self.config.iteritems():
-            r[k] = v
-        return r
-    
+        result = DevController.getDeviceConfiguration(self, devid)
+
+        devinfo = self.readBackend(devid, *CONFIG_ENTRIES)
+        return dict([(CONFIG_ENTRIES[i], devinfo[i])
+                     for i in range(len(CONFIG_ENTRIES))
+                     if devinfo[i] is not None])
+
+
     def createDevice(self, config):
         DevController.createDevice(self, config)
-        self.config = config
         std_args = [ "--domid", "%d" % self.vm.getDomid(),
                      "--title", self.vm.getName() ]
         t = config.get("type", None)
@@ -47,7 +53,7 @@ class VfbifController(DevController):
                 passwd = config["vncpasswd"]
             else:
                 passwd = xen.xend.XendRoot.instance().get_vncpasswd_default()
-            if not(passwd is None or passwd == ""):
+            if passwd:
                 self.vm.storeVm("vncpasswd", passwd)
                 log.debug("Stored a VNC password for vfb access")
             else:

_______________________________________________
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] Write the xfb configuration details to the store, rather than storing them in, Xen patchbot-unstable <=