WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix sxp2xml translation to handle maxmem.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix sxp2xml translation to handle maxmem.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2007 13:30:18 -0700
Delivery-date: Tue, 20 Mar 2007 13:30:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174403737 0
# Node ID fc918d15c981bb310c524674e2cd1f18320475d5
# Parent  d86957cea8b83bd6421a36e9d45fb65606176447
Fix sxp2xml translation to handle maxmem.

Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xm/xenapi_create.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r d86957cea8b8 -r fc918d15c981 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Tue Mar 20 15:12:07 2007 +0000
+++ b/tools/python/xen/xm/xenapi_create.py      Tue Mar 20 15:15:37 2007 +0000
@@ -513,10 +513,14 @@ class sxp2xml:
         memory_str = str(int(
             get_child_by_name(config, "memory"))*1024*1024)
 
-        memory.attributes["static_min"] = memory_str
+        memory.attributes["static_min"] = str(0)
         memory.attributes["static_max"] = memory_str
         memory.attributes["dynamic_min"] = memory_str
         memory.attributes["dynamic_max"] = memory_str
+
+        if get_child_by_name(config, "maxmem"):
+            memory.attributes["static_max"] = \
+               str(int(get_child_by_name(config, "maxmem")*1024*1024))
 
         vm.appendChild(memory)
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix sxp2xml translation to handle maxmem., Xen patchbot-unstable <=