mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[XEND] Update vcpu_avail when parsing configuration.
Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
dc960266aa
commit
59a3344cac
1 file changed
+5
@@ -353,10 +353,15 @@ class XendConfig(dict):
|
||||
if self['builder'] not in ('hvm', 'linux'):
|
||||
raise XendConfigError('Invalid builder configuration')
|
||||
|
||||
def _vcpus_sanity_check(self):
|
||||
if self.get('vcpus_number') != None:
|
||||
self['vcpu_avail'] = (1 << self['vcpus_number']) - 1
|
||||
|
||||
def validate(self):
|
||||
self._memory_sanity_check()
|
||||
self._actions_sanity_check()
|
||||
self._builder_sanity_check()
|
||||
self._vcpus_sanity_check()
|
||||
|
||||
def _dominfo_to_xapi(self, dominfo):
|
||||
self['domid'] = dominfo['domid']
|
||||
|
||||