xen/15609-save-mem-values.patch

41 lines
1.7 KiB
Diff

# HG changeset patch
# User kfraser@localhost.localdomain
# Date 1184749804 -3600
# Node ID 2cbaa58b131172dd7b35c384cbe2027e3893e26f
# Parent 9c077fc8ccf132b5e0074e44edda83bf9152675f
[xend][xen-api] Save new memory values in domain config when calling
VM.set_memory_[dynamic|static]_[min|max] via Xen API.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Index: xen-3.1-testing/tools/python/xen/xend/XendAPI.py
===================================================================
--- xen-3.1-testing.orig/tools/python/xen/xend/XendAPI.py
+++ xen-3.1-testing/tools/python/xen/xend/XendAPI.py
@@ -1393,22 +1393,22 @@ class XendAPI(object):
def VM_set_memory_dynamic_max(self, session, vm_ref, mem):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
dom.set_memory_dynamic_max(int(mem))
- return xen_api_success_void()
+ return self._VM_save(dom)
def VM_set_memory_dynamic_min(self, session, vm_ref, mem):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
dom.set_memory_dynamic_min(int(mem))
- return xen_api_success_void()
+ return self._VM_save(dom)
def VM_set_memory_static_max(self, session, vm_ref, mem):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
dom.set_memory_static_max(int(mem))
- return xen_api_success_void()
+ return self._VM_save(dom)
def VM_set_memory_static_min(self, session, vm_ref, mem):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
dom.set_memory_static_min(int(mem))
- return xen_api_success_void()
+ return self._VM_save(dom)
def VM_set_memory_dynamic_max_live(self, session, vm_ref, mem):
dom = XendDomain.instance().get_vm_by_uuid(vm_ref)