All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][xend] Save memory values changed via Xen API
@ 2007-07-17 22:41 Jim Fehlig
  0 siblings, 0 replies; only message in thread
From: Jim Fehlig @ 2007-07-17 22:41 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

Memory values changed via Xen API methods
VM.set_memory_[dynamic|static]_[min|max] are not saved to managed
domain's config.  Attached is a trivial fix.

Regards,
Jim

[-- Attachment #2: xend_save_mem_values.patch --]
[-- Type: text/x-patch, Size: 1712 bytes --]

# HG changeset patch
# User Jim Fehlig <jfehlig@novell.com>
# Date 1184711414 21600
# Node ID ff3f73de683f9c720ba3c2922d4f51897b9b5ef0
# Parent  1f348e70a5affdea9b44c1e39cd5ef094ad4a0bf
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>

diff -r 1f348e70a5af -r ff3f73de683f tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py	Tue Jul 10 11:10:38 2007 +0100
+++ b/tools/python/xen/xend/XendAPI.py	Tue Jul 17 16:30:14 2007 -0600
@@ -1410,22 +1410,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)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-17 22:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-17 22:41 [PATCH][xend] Save memory values changed via Xen API Jim Fehlig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.