[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH] [CA-34305] Enables the set-memory-limits call for VM templates.
# HG changeset patch # User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx> [CA-34305] Enables the set-memory-limits call for VM templates. Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx> diff -r 59da465cfc7f ocaml/xapi/xapi_vm_lifecycle.ml --- a/ocaml/xapi/xapi_vm_lifecycle.ml Wed Oct 28 14:30:38 2009 +0000 +++ b/ocaml/xapi/xapi_vm_lifecycle.ml Wed Oct 28 14:55:08 2009 +0000 @@ -160,9 +160,20 @@ List.mem_assoc Xapi_globs.default_template_key vmr.Db_actions.vM_other_config && (List.assoc Xapi_globs.default_template_key vmr.Db_actions.vM_other_config) = "true" in + let allowed_operations = [ + `changing_dynamic_range; + `changing_static_range; + `changing_memory_limits; + `clone; + `copy; + `create_template; + `export; + `metadata_export; + `provision; + ] in if false - || List.mem op [`clone; `copy; `export; `provision; `metadata_export; `create_template; `changing_dynamic_range; `changing_static_range] - || (op = `destroy && not default_template) + || List.mem op allowed_operations + || (op = `destroy && not default_template) then None else Some (Api_errors.vm_is_template, [ref_str; Record_util.vm_operation_to_string op]) Attachment:
CA-34305 _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |