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-api

[Xen-API] [PATCH] [CA-36287] Makes it possible use various memory-relate

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] [CA-36287] Makes it possible use various memory-related API functions to configure templates. Extends the "vm-memory-limits-set", "vm-memory-dynamic-range-set" and "vm-memory-static-range-set" functions to accept template UUIDs
From: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Date: Tue, 2 Feb 2010 17:43:23 +0000
Delivery-date: Tue, 02 Feb 2010 09:43:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
# Date 1265132601 0
# Node ID 50367754c206864b545e32e4cde1d746b374e4c9
# Parent  5c2ab1c86dc5b7a44491f440b26aa42d11703aa8
[CA-36287] Makes it possible use various memory-related API functions to 
configure templates. Extends the "vm-memory-limits-set", 
"vm-memory-dynamic-range-set" and "vm-memory-static-range-set" functions to 
accept template UUIDs.

Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>

diff -r 5c2ab1c86dc5 -r 50367754c206 ocaml/xapi/cli_operations.ml
--- a/ocaml/xapi/cli_operations.ml      Tue Feb 02 17:41:46 2010 +0000
+++ b/ocaml/xapi/cli_operations.ml      Tue Feb 02 17:43:21 2010 +0000
@@ -1769,20 +1769,24 @@
 let vm_memory_dynamic_range_set printer rpc session_id params = 
        let min = Record_util.bytes_of_string "min" (List.assoc "min" params)
        and max = Record_util.bytes_of_string "max" (List.assoc "max" params) in
-       ignore (do_vm_op ~include_control_vms:true printer rpc session_id
-       (fun vm ->
-               Client.VM.set_memory_dynamic_range rpc session_id
-                       (vm.getref ()) min max) params ["min"; "max"]
-       )
+       ignore
+               (do_vm_op ~include_control_vms:true ~include_template_vms:true
+                       printer rpc session_id
+                       (fun vm ->
+                               Client.VM.set_memory_dynamic_range rpc 
session_id
+                                       (vm.getref ()) min max)
+                       params ["min"; "max"])
 
 let vm_memory_static_range_set printer rpc session_id params =
        let min = Record_util.bytes_of_string "min" (List.assoc "min" params)
        and max = Record_util.bytes_of_string "max" (List.assoc "max" params) in
-       ignore (do_vm_op ~include_control_vms:true printer rpc session_id
-       (fun vm ->
-               Client.VM.set_memory_static_range rpc session_id
-                       (vm.getref ()) min max) params ["min"; "max"]
-       )
+       ignore
+               (do_vm_op ~include_control_vms:true ~include_template_vms:true
+                       printer rpc session_id
+                       (fun vm ->
+                               Client.VM.set_memory_static_range rpc session_id
+                                       (vm.getref ()) min max)
+                       params ["min"; "max"])
 
 let vm_memory_limits_set printer rpc session_id params =
        let extract key =
@@ -1791,13 +1795,13 @@
        and static_max = extract "static-max"
        and dynamic_min = extract "dynamic-min"
        and dynamic_max = extract "dynamic-max" in
-       ignore (
-               do_vm_op ~include_control_vms:true printer rpc session_id
+       ignore
+               (do_vm_op ~include_control_vms:true ~include_template_vms:true
+                       printer rpc session_id
                        (fun vm ->
                                Client.VM.set_memory_limits rpc session_id 
(vm.getref ())
                                        static_min static_max dynamic_min 
dynamic_max)
-                       params ["static-min"; "static-max"; "dynamic-min"; 
"dynamic-max"]
-       )
+                       params ["static-min"; "static-max"; "dynamic-min"; 
"dynamic-max"])
 
 let vm_memory_target_set printer rpc session_id params = 
        let target = Record_util.bytes_of_string "target"
1 file changed, 18 insertions(+), 14 deletions(-)
ocaml/xapi/cli_operations.ml |   32 ++++++++++++++++++--------------


Attachment: xen-api.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] [CA-36287] Makes it possible use various memory-related API functions to configure templates. Extends the "vm-memory-limits-set", "vm-memory-dynamic-range-set" and "vm-memory-static-range-set" functions to accept template UUIDs, Jonathan Knowles <=