ia64/xen-unstable

changeset 6836:2277377dfc3a

Move name back into main domain dir.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Wed Sep 14 15:25:28 2005 +0000 (2005-09-14)
parents 5cbb2ecce16a
children a8edb2655c5d
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Sep 14 15:10:22 2005 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Sep 14 15:25:28 2005 +0000
     1.3 @@ -149,6 +149,7 @@ class XendDomainInfo:
     1.4          path = "/".join(db.getPath().split("/")[0:-2])
     1.5          vm = cls(uuid, path, db)
     1.6          vm.setDomid(domid)
     1.7 +        vm.name = vm.readStore("name")
     1.8          try:
     1.9              db.readDB()
    1.10          except: pass
    1.11 @@ -202,7 +203,6 @@ class XendDomainInfo:
    1.12      restore = classmethod(restore)
    1.13  
    1.14      __exports__ = [
    1.15 -        DBVar('name',          ty='str'),
    1.16          DBVar('config',        ty='sxpr'),
    1.17          DBVar('start_time',    ty='float'),
    1.18          DBVar('state',         ty='str'),
    1.19 @@ -264,6 +264,9 @@ class XendDomainInfo:
    1.20  
    1.21          xstransact.Write(self.path, "uuid", self.uuid)
    1.22  
    1.23 +    def readStore(self, key):
    1.24 +        return xstransact.Read(self.path, key)
    1.25 +
    1.26      def setDB(self, db):
    1.27          self.db = db
    1.28  
    1.29 @@ -292,7 +295,7 @@ class XendDomainInfo:
    1.30  
    1.31      def setName(self, name):
    1.32          self.name = name
    1.33 -        self.db.name = self.name
    1.34 +        xstransact.Write(self.path, "name", name)
    1.35  
    1.36      def getName(self):
    1.37          return self.name