|
|
|
|
|
|
|
|
|
|
xen-changelog
ChangeSet 1.1607, 2005/05/31 10:32:19+01:00, cl349@xxxxxxxxxxxxxxxxxxxx
Merge
XendConsole.py | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 deletions(-)
diff -Nru a/tools/python/xen/xend/XendConsole.py
b/tools/python/xen/xend/XendConsole.py
--- a/tools/python/xen/xend/XendConsole.py 2005-05-31 12:02:55 -04:00
+++ b/tools/python/xen/xend/XendConsole.py 2005-05-31 12:02:55 -04:00
@@ -1,32 +1,26 @@
# Copyright (C) 2004 Mike Wray <mike.wray@xxxxxx>
+import XendRoot; xroot = XendRoot.instance()
from XendError import XendError
-import EventServer
-eserver = EventServer.instance()
-
-from xen.xend.server import SrvDaemon
-daemon = SrvDaemon.instance()
-
class XendConsole:
def __init__(self):
pass
- eserver.subscribe('xend.domain.died', self.onDomainDied)
- eserver.subscribe('xend.domain.destroy', self.onDomainDied)
-
- def onDomainDied(self, event, val):
- pass
def console_ls(self):
return [ c.console_port for c in self.consoles() ]
def consoles(self):
- return daemon.get_consoles()
-
- def console_create(self, dom, console_port=None):
- consinfo = daemon.console_create(dom, console_port=console_port)
- return consinfo
+ l = []
+ xd = XendRoot.get_component('xen.xend.XendDomain')
+ for vm in xd.list():
+ ctrl = vm.getDeviceController("console", error=False)
+ if (not ctrl): continue
+ console = ctrl.getDevice(0)
+ if (not console): continue
+ l.append(console)
+ return l
def console_get(self, id):
id = int(id)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
|
|
|
|