[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Add missing ConsoleController.py
# HG changeset patch # User Alastair Tse <atse@xxxxxxxxxxxxx> # Date 1169779475 0 # Node ID ba3ec84c9423a4eb7f7a4c1de052f9e935d17891 # Parent 9d1d9877131de3aec3d56b277c03075d7f63f3a1 [XEND] Add missing ConsoleController.py Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx> --- tools/python/xen/xend/server/ConsoleController.py | 29 ++++++++++++++++++++++ 1 files changed, 29 insertions(+) diff -r 9d1d9877131d -r ba3ec84c9423 tools/python/xen/xend/server/ConsoleController.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/python/xen/xend/server/ConsoleController.py Fri Jan 26 02:44:35 2007 +0000 @@ -0,0 +1,29 @@ +from xen.xend.server.DevController import DevController +from xen.xend.XendLogging import log + +from xen.xend.XendError import VmError + +class ConsoleController(DevController): + """A dummy controller for us to represent serial and vnc + console devices with persistent UUIDs. + """ + + valid_cfg = ['uri', 'uuid', 'protocol'] + + def __init__(self, vm): + DevController.__init__(self, vm) + self.hotplug = False + + def getDeviceDetails(self, config): + back = dict([(k, config[k]) for k in self.valid_cfg if k in config]) + return (self.allocateDeviceID(), back, {}) + + + def getDeviceConfiguration(self, devid): + result = DevController.getDeviceConfiguration(self, devid) + devinfo = self.readBackend(devid, *self.valid_cfg) + config = dict(zip(self.valid_cfg, devinfo)) + config = dict([(key, val) for key, val in config.items() + if val != None]) + return config + _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |