direct-io.hg
changeset 6708:fbdb56cd611b
Remove dependency between domain db and path/uuid.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Fri Sep 09 16:07:26 2005 +0000 (2005-09-09) |
parents | d0b3c7061368 |
children | 578c19d1ed49 |
files | tools/python/xen/xend/XendDomainInfo.py |
line diff
1.1 --- a/tools/python/xen/xend/XendDomainInfo.py Fri Sep 09 16:06:04 2005 +0000 1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Sep 09 16:07:26 2005 +0000 1.3 @@ -156,7 +156,8 @@ class XendDomainInfo: 1.4 """ 1.5 uuid = getUuid() 1.6 db = parentdb.addChild(uuid) 1.7 - vm = cls(db) 1.8 + path = parentdb.getPath() 1.9 + vm = cls(uuid, path, db) 1.10 vm.construct(config) 1.11 vm.saveToDB(sync=True) 1.12 1.13 @@ -171,7 +172,8 @@ class XendDomainInfo: 1.14 @param info: domain info from xc 1.15 """ 1.16 dom = info['dom'] 1.17 - vm = cls(db) 1.18 + path = "/".join(db.getPath().split("/")[0:-1]) 1.19 + vm = cls(db.getName(), path, db) 1.20 vm.setdom(dom) 1.21 db.readDB() 1.22 vm.importFromDB() 1.23 @@ -206,7 +208,8 @@ class XendDomainInfo: 1.24 if not uuid: 1.25 uuid = getUuid() 1.26 db = parentdb.addChild(uuid) 1.27 - vm = cls(db) 1.28 + path = parentdb.getPath() 1.29 + vm = cls(uuid, path, db) 1.30 ssidref = int(sxp.child_value(config, 'ssidref')) 1.31 log.debug('restoring with ssidref='+str(ssidref)) 1.32 id = xc.domain_create(ssidref = ssidref) 1.33 @@ -239,9 +242,10 @@ class XendDomainInfo: 1.34 DBVar('device_model_pid', ty='int'), 1.35 ] 1.36 1.37 - def __init__(self, db): 1.38 + def __init__(self, uuid, path, db): 1.39 + self.uuid = uuid 1.40 + self.path = path + "/" + uuid 1.41 self.db = db 1.42 - self.uuid = db.getName() 1.43 1.44 self.recreate = 0 1.45 self.restore = 0