ia64/xen-unstable

annotate 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
rev   line source
atse@13642 1 from xen.xend.server.DevController import DevController
atse@13642 2 from xen.xend.XendLogging import log
atse@13642 3
atse@13642 4 from xen.xend.XendError import VmError
atse@13642 5
atse@13642 6 class ConsoleController(DevController):
atse@13642 7 """A dummy controller for us to represent serial and vnc
atse@13642 8 console devices with persistent UUIDs.
atse@13642 9 """
atse@13642 10
atse@13771 11 valid_cfg = ['location', 'uuid', 'protocol']
atse@13642 12
atse@13642 13 def __init__(self, vm):
atse@13642 14 DevController.__init__(self, vm)
atse@13642 15 self.hotplug = False
atse@13642 16
atse@13642 17 def getDeviceDetails(self, config):
atse@13642 18 back = dict([(k, config[k]) for k in self.valid_cfg if k in config])
atse@13642 19 return (self.allocateDeviceID(), back, {})
atse@13642 20
atse@13642 21
keir@16268 22 def getDeviceConfiguration(self, devid, transaction = None):
keir@16268 23 result = DevController.getDeviceConfiguration(self, devid, transaction)
keir@16268 24 if transaction is None:
keir@16268 25 devinfo = self.readBackend(devid, *self.valid_cfg)
keir@16268 26 else:
keir@16268 27 devinfo = self.readBackendTxn(transaction, devid, *self.valid_cfg)
atse@13642 28 config = dict(zip(self.valid_cfg, devinfo))
atse@13642 29 config = dict([(key, val) for key, val in config.items()
atse@13642 30 if val != None])
atse@13642 31 return config
atse@13642 32
kaf24@13678 33 def migrate(self, deviceConfig, network, dst, step, domName):
kaf24@13678 34 return 0
atse@13771 35
atse@13771 36 def destroyDevice(self, devid, force):
atse@13771 37 DevController.destroyDevice(self, devid, True)
atse@13771 38