Fix the backward compatibility support for using 'vcpus' in the image section of the domain sexp.

Signed-off-by: Robert Read <robert@xensource.com>
This commit is contained in:
rread@ubuntu.eng.hq.xensource.com committed 2006-02-08 19:20:51 -07:00
1 parent c362c8308e
commit ebaab45e14
1 file changed
+3 -1
+3 -1
View File
@@ -294,7 +294,9 @@ def parseConfig(config):
try:
if result['image']:
v = sxp.child_value(result['image'], 'vcpus')
if v is not None and int(v) != result['vcpus']:
if result['vcpus'] is None and v is not None:
result['vcpus'] = int(v)
elif v is not None and int(v) != result['vcpus']:
log.warn(('Image VCPUs setting overrides vcpus=%d elsewhere.'
' Using %s VCPUs for VM %s.') %
(result['vcpus'], v, result['uuid']))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.