diff options
author | mjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com> | 2004-06-21 13:52:36 +0000 |
---|---|---|
committer | mjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com> | 2004-06-21 13:52:36 +0000 |
commit | 4b479fc8a35a3d9890f3a9ab02d6abdbb70a3dc3 (patch) | |
tree | 7489e46c7826fb99bbaafc9202fdea9cf9a056ab /tools/xenmgr/lib/server/SrvConsoleServer.py | |
parent | f2829d6aca4a85ef7d79849ca84a20affe0de410 (diff) | |
download | xen-4b479fc8a35a3d9890f3a9ab02d6abdbb70a3dc3.tar.gz xen-4b479fc8a35a3d9890f3a9ab02d6abdbb70a3dc3.tar.bz2 xen-4b479fc8a35a3d9890f3a9ab02d6abdbb70a3dc3.zip |
bitkeeper revision 1.990.2.7 (40d6e824hB2u1UturpvFrAcgmJLBwA)
Remove obsolete api. Move domain control api onto xend.
Diffstat (limited to 'tools/xenmgr/lib/server/SrvConsoleServer.py')
-rw-r--r-- | tools/xenmgr/lib/server/SrvConsoleServer.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/xenmgr/lib/server/SrvConsoleServer.py b/tools/xenmgr/lib/server/SrvConsoleServer.py index 88f3964811..c33ddbd832 100644 --- a/tools/xenmgr/lib/server/SrvConsoleServer.py +++ b/tools/xenmgr/lib/server/SrvConsoleServer.py @@ -21,6 +21,8 @@ from twisted.internet import protocol from twisted.internet import abstract from twisted.internet import defer +import Xc; xc = Xc.new() + import xend.utils from xenmgr import sxp @@ -559,6 +561,16 @@ class Daemon: reactor.diconnectAll() sys.exit(0) + def blkif_set_control_domain(self, dom): + """Set the block device backend control domain. + """ + return self.blkifCF.setControlDomain(dom) + + def blkif_get_control_domain(self, dom): + """Get the block device backend control domain. + """ + return self.blkifCF.getControlDomain() + def blkif_create(self, dom): """Create a block device interface controller. @@ -579,6 +591,16 @@ class Daemon: d = ctrl.attach_device(vdev, mode, segment) return d + def netif_set_control_domain(self, dom): + """Set the network interface backend control domain. + """ + return self.netifCF.setControlDomain(dom) + + def netif_get_control_domain(self, dom): + """Get the network interface backend control domain. + """ + return self.netifCF.getControlDomain() + def netif_create(self, dom): """Create a network interface controller. @@ -622,6 +644,28 @@ class Daemon: if console.conn: console.conn.loseConnection() + def domain_start(self, id): + """Start domain running. + """ + dom = int(id) + if dom <= 0: return 0 + return xc.domain_start(dom=dom) + + def domain_stop(self, id): + """Stop domain running. + """ + dom = int(id) + if dom <= 0: return 0 + xc.domain_stop(dom=dom) + + def domain_destroy(self, id, force=0): + """Destroy a domain. Shutdown if force=0, terminate immediately if force=1. + """ + dom = int(id) + if dom <= 0: return 0 + return xc.domain_destroy(dom=dom, force=0) + + def instance(): global inst try: |