From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: [PATCH][xend] Save memory values changed via Xen API Date: Tue, 17 Jul 2007 16:41:12 -0600 Message-ID: <469D4588.9080009@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030705040400020802030100" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------030705040400020802030100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------030705040400020802030100 Content-Type: text/x-patch; name="xend_save_mem_values.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xend_save_mem_values.patch" # HG changeset patch # User Jim Fehlig # 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 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) --------------030705040400020802030100 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------030705040400020802030100--