mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1159.258.162 (429d8356O4B1x4zcoZgFnPVsJ5OKMQ)
XendDomainConfig.py is not used. Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
227268c011
commit
04cb9d7707
2 files changed
-45
No files matched your search
@@ -1,44 +0,0 @@
|
||||
# Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
|
||||
|
||||
"""Handler for persistent domain configs.
|
||||
|
||||
"""
|
||||
|
||||
import sxp
|
||||
import XendDB
|
||||
import XendDomain
|
||||
|
||||
__all__ = [ "XendDomainConfig" ]
|
||||
|
||||
class XendDomainConfig:
|
||||
|
||||
dbpath = 'config'
|
||||
|
||||
def __init__(self):
|
||||
self.db = XendDB.XendDB(self.dbpath)
|
||||
|
||||
def domain_config_ls(self, path):
|
||||
return self.db.ls(path)
|
||||
|
||||
def domain_config_create(self, path, sxpr):
|
||||
self.db.save(path, sxpr)
|
||||
pass
|
||||
|
||||
def domain_config_delete(self, path):
|
||||
self.db.delete(path)
|
||||
|
||||
def domain_config_instance(self, path):
|
||||
"""Create a domain from a config.
|
||||
"""
|
||||
config = self.db.fetch(path)
|
||||
xd = XendDomain.instance()
|
||||
newdom = xd.domain_create(config)
|
||||
return newdom
|
||||
|
||||
def instance():
|
||||
global inst
|
||||
try:
|
||||
inst
|
||||
except:
|
||||
inst = XendDomainConfig()
|
||||
return inst
|
||||