ia64/xen-unstable

view tools/python/xen/xend/server/ConsoleController.py @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 09d8b6eb3131
children
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 = ['location', '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, transaction = None):
23 result = DevController.getDeviceConfiguration(self, devid, transaction)
24 if transaction is None:
25 devinfo = self.readBackend(devid, *self.valid_cfg)
26 else:
27 devinfo = self.readBackendTxn(transaction, devid, *self.valid_cfg)
28 config = dict(zip(self.valid_cfg, devinfo))
29 config = dict([(key, val) for key, val in config.items()
30 if val != None])
31 return config
33 def migrate(self, deviceConfig, network, dst, step, domName):
34 return 0
36 def destroyDevice(self, devid, force):
37 DevController.destroyDevice(self, devid, True)