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] Remove dependency between domain db and path/uuid.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove dependency between domain db and path/uuid.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Sep 2005 17:42:11 +0000
Delivery-date: Fri, 09 Sep 2005 17:40:40 +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 fbdb56cd611b31a6924d3dd881fae64f9d7ec0e1
# Parent  d0b3c7061368319bae88e81028962cf54f46bf60
Remove dependency between domain db and path/uuid.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r d0b3c7061368 -r fbdb56cd611b tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Sep  9 16:06:04 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Sep  9 16:07:26 2005
@@ -156,7 +156,8 @@
         """
         uuid = getUuid()
         db = parentdb.addChild(uuid)
-        vm = cls(db)
+        path = parentdb.getPath()
+        vm = cls(uuid, path, db)
         vm.construct(config)
         vm.saveToDB(sync=True)
 
@@ -171,7 +172,8 @@
         @param info:      domain info from xc
         """
         dom = info['dom']
-        vm = cls(db)
+        path = "/".join(db.getPath().split("/")[0:-1])
+        vm = cls(db.getName(), path, db)
         vm.setdom(dom)
         db.readDB()
         vm.importFromDB()
@@ -206,7 +208,8 @@
         if not uuid:
             uuid = getUuid()
         db = parentdb.addChild(uuid)
-        vm = cls(db)
+        path = parentdb.getPath()
+        vm = cls(uuid, path, db)
         ssidref = int(sxp.child_value(config, 'ssidref'))
         log.debug('restoring with ssidref='+str(ssidref))
         id = xc.domain_create(ssidref = ssidref)
@@ -239,9 +242,10 @@
         DBVar('device_model_pid', ty='int'),
         ]
     
-    def __init__(self, db):
+    def __init__(self, uuid, path, db):
+        self.uuid = uuid
+        self.path = path + "/" + uuid
         self.db = db
-        self.uuid = db.getName()
 
         self.recreate = 0
         self.restore = 0

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove dependency between domain db and path/uuid., Xen patchbot -unstable <=