[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Move start_time out of xend dir and use gather/store.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |