direct-io.hg

changeset 14454:fc918d15c981

Fix sxp2xml translation to handle maxmem.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Mar 20 15:15:37 2007 +0000 (2007-03-20)
parents d86957cea8b8
children bea7ff5ebd60
files tools/python/xen/xm/xenapi_create.py
line diff
     1.1 --- a/tools/python/xen/xm/xenapi_create.py	Tue Mar 20 15:12:07 2007 +0000
     1.2 +++ b/tools/python/xen/xm/xenapi_create.py	Tue Mar 20 15:15:37 2007 +0000
     1.3 @@ -513,11 +513,15 @@ class sxp2xml:
     1.4          memory_str = str(int(
     1.5              get_child_by_name(config, "memory"))*1024*1024)
     1.6  
     1.7 -        memory.attributes["static_min"] = memory_str
     1.8 +        memory.attributes["static_min"] = str(0)
     1.9          memory.attributes["static_max"] = memory_str
    1.10          memory.attributes["dynamic_min"] = memory_str
    1.11          memory.attributes["dynamic_max"] = memory_str
    1.12  
    1.13 +        if get_child_by_name(config, "maxmem"):
    1.14 +            memory.attributes["static_max"] = \
    1.15 +               str(int(get_child_by_name(config, "maxmem")*1024*1024))
    1.16 +
    1.17          vm.appendChild(memory)
    1.18  
    1.19          # And now the vbds