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] Move start_time out of xend dir and use gather/store.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Move start_time out of xend dir and use gather/store.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Sep 2005 19:58:12 +0000
Delivery-date: Wed, 14 Sep 2005 19:56:53 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID bc5dbfe729e0ac4c1de007d7608e3ec96d369674
# Parent  960d4f6b58b3fb4d3dab82f98254fa3e6bcbe52a
Move start_time out of xend dir and use gather/store.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 960d4f6b58b3 -r bc5dbfe729e0 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Sep 14 19:29:25 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Sep 14 19:30:08 2005
@@ -149,7 +149,8 @@
         path = "/".join(db.getPath().split("/")[0:-2])
         vm = cls(uuid, path, db)
         vm.setDomid(domid)
-        vm.name = vm.readVm("name")
+        vm.name, vm.start_time = vm.gatherVm(("name", str),
+                                             ("start-time", float))
         try:
             db.readDB()
         except: pass
@@ -204,7 +205,6 @@
 
     __exports__ = [
         DBVar('config',        ty='sxpr'),
-        DBVar('start_time',    ty='float'),
         DBVar('state',         ty='str'),
         DBVar('restart_mode',  ty='str'),
         DBVar('restart_state', ty='str'),
@@ -274,6 +274,12 @@
     def removeVm(self, *args):
         return xstransact.Remove(self.path, *args)
 
+    def gatherVm(self, *args):
+        return xstransact.Gather(self.path, *args)
+
+    def storeVm(self, *args):
+        return xstransact.Store(self.path, *args)
+
     def readDom(self, *args):
         return xstransact.Read(self.path, *args)
 
@@ -282,6 +288,12 @@
 
     def removeDom(self, *args):
         return xstransact.Remove(self.path, *args)
+
+    def gatherDom(self, *args):
+        return xstransact.Gather(self.path, *args)
+
+    def storeDom(self, *args):
+        return xstransact.Store(self.path, *args)
 
     def setDB(self, db):
         self.db = db
@@ -800,6 +812,7 @@
             return
         if self.start_time is None:
             self.start_time = time.time()
+            self.storeVm(("start-time", self.start_time))
         try:
             cpu = int(sxp.child_value(self.config, 'cpu', '-1'))
         except:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Move start_time out of xend dir and use gather/store., Xen patchbot -unstable <=