]> xenbits.xensource.com Git - xen.git/commitdiff
Remove duplicate memory values from the SXP.
authorEwan Mellor <ewan@xensource.com>
Thu, 22 Mar 2007 18:37:37 +0000 (18:37 +0000)
committerEwan Mellor <ewan@xensource.com>
Thu, 22 Mar 2007 18:37:37 +0000 (18:37 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendConfig.py

index 7d69a38e4f1af968d7699dcad8e0a719de95ad92..d3301fc10905d99411b9365b6f65c64e5b3c661a 100644 (file)
@@ -44,7 +44,7 @@ def reverse_dict(adict):
     return dict([(v, k) for k, v in adict.items()])
 
 def bool0(v):
-    return v != '0' and bool(v)
+    return v != '0' and v != 'False' and bool(v)
 
 # Recursively copy a data struct, scrubbing out VNC passwords.
 # Will scrub any dict entry with a key of 'vncpasswd' or any
@@ -128,7 +128,6 @@ XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
 
 XENAPI_CFG_TYPES = {
     'uuid': str,
-    'power_state': str,
     'name_label': str,
     'name_description': str,
     'user_version': str,
@@ -854,16 +853,6 @@ class XendConfig(dict):
         sxpr.append(["maxmem", int(self["memory_static_max"])/MiB])
         sxpr.append(["memory", int(self["memory_dynamic_max"])/MiB])
 
-        if not legacy_only:
-            sxpr.append(['memory_dynamic_min',
-                     int(self.get('memory_dynamic_min'))])
-            sxpr.append(['memory_dynamic_max',
-                     int(self.get('memory_dynamic_max'))])
-            sxpr.append(['memory_static_max',
-                     int(self.get('memory_static_max'))])
-            sxpr.append(['memory_static_min',
-                     int(self.get('memory_static_min'))])
-
         for legacy in LEGACY_UNSUPPORTED_BY_XENAPI_CFG:
             if legacy in ('domid', 'uuid'): # skip these
                 continue