ia64/xen-unstable

changeset 8804:66260f1a9bde

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

Signed-off-by: Robert Read <robert@xensource.com>
author rread@ubuntu.eng.hq.xensource.com
date Wed Feb 08 19:20:51 2006 -0700 (2006-02-08)
parents 99e7b8f9122e
children 01fa38f79207
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Feb 09 00:27:52 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Feb 08 19:20:51 2006 -0700
     1.3 @@ -294,7 +294,9 @@ def parseConfig(config):
     1.4      try:
     1.5          if result['image']:
     1.6              v = sxp.child_value(result['image'], 'vcpus')
     1.7 -            if v is not None and int(v) != result['vcpus']:
     1.8 +            if result['vcpus'] is None and v is not None:
     1.9 +                result['vcpus'] = int(v)
    1.10 +            elif v is not None and int(v) != result['vcpus']:
    1.11                  log.warn(('Image VCPUs setting overrides vcpus=%d elsewhere.'
    1.12                            '  Using %s VCPUs for VM %s.') %
    1.13                           (result['vcpus'], v, result['uuid']))