ia64/xen-unstable

view tools/python/xen/xend/server/ConsoleController.py @ 13678:fbe161b1af16

To avoid problems (hang) when doing migration, the Console Controller
needs to implement a (dummy) migrate method.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
author kaf24@localhost.localdomain
date Sun Jan 28 09:47:22 2007 +0000 (2007-01-28)
parents ba3ec84c9423
children 3cccf8e64296
line source
1 from xen.xend.server.DevController import DevController
2 from xen.xend.XendLogging import log
4 from xen.xend.XendError import VmError
6 class ConsoleController(DevController):
7 """A dummy controller for us to represent serial and vnc
8 console devices with persistent UUIDs.
9 """
11 valid_cfg = ['uri', 'uuid', 'protocol']
13 def __init__(self, vm):
14 DevController.__init__(self, vm)
15 self.hotplug = False
17 def getDeviceDetails(self, config):
18 back = dict([(k, config[k]) for k in self.valid_cfg if k in config])
19 return (self.allocateDeviceID(), back, {})
22 def getDeviceConfiguration(self, devid):
23 result = DevController.getDeviceConfiguration(self, devid)
24 devinfo = self.readBackend(devid, *self.valid_cfg)
25 config = dict(zip(self.valid_cfg, devinfo))
26 config = dict([(key, val) for key, val in config.items()
27 if val != None])
28 return config
30 def migrate(self, deviceConfig, network, dst, step, domName):
31 return 0