[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH 10 of 12] [PCR0047] Adding appropriate boilerplate code for Dynamic Memory Control ("dmc") to the restrictions module
# HG changeset patch # User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx> # Date 1265041876 0 # Node ID 9322132154fe8d245d0477e7d45419ec3d6e8d41 # Parent e61b811f0c2c0867257b8053649a4343b4bd5ea0 [PCR0047] Adding appropriate boilerplate code for Dynamic Memory Control ("dmc") to the restrictions module. Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx> diff -r e61b811f0c2c -r 9322132154fe ocaml/license/restrictions.ml --- a/ocaml/license/restrictions.ml Mon Feb 01 15:59:05 2010 +0000 +++ b/ocaml/license/restrictions.ml Mon Feb 01 16:31:16 2010 +0000 @@ -52,6 +52,7 @@ enable_performance : bool; enable_wlb : bool; enable_rbac : bool; + enable_dmc : bool; restrict_connection : bool; platform_filter : bool; regular_nag_dialog : bool; @@ -71,6 +72,7 @@ (if x.enable_performance then "perf " else " " ) ^ (if x.enable_wlb then "WLB " else " " ) ^ (if x.enable_rbac then "RBAC " else " " ) ^ + (if x.enable_dmc then "DMC " else " " ) ^ (if x.restrict_connection then " " else "Cnx " ) ^ (if x.platform_filter then " " else "Plat " ) ^ (if x.regular_nag_dialog then " nag " else " " ) @@ -89,6 +91,7 @@ enable_performance = true; enable_wlb = true; enable_rbac = true; + enable_dmc = true; restrict_connection = false; platform_filter = false; regular_nag_dialog = false; @@ -109,6 +112,7 @@ enable_performance = a.enable_performance && b.enable_performance; enable_wlb = a.enable_wlb && b.enable_wlb; enable_rbac = a.enable_rbac && b.enable_rbac; + enable_dmc = a.enable_dmc && b.enable_dmc; restrict_connection = a.restrict_connection || b.restrict_connection; platform_filter = a.platform_filter || b.platform_filter; regular_nag_dialog = a.regular_nag_dialog || b.regular_nag_dialog; @@ -137,6 +141,7 @@ let _restrict_historical_performance = "restrict_historical_performance" let _restrict_wlb = "restrict_wlb" let _restrict_rbac = "restrict_rbac" +let _restrict_dmc = "restrict_dmc" let _regular_nag_dialog = "regular_nag_dialog" let to_assoc_list (x: restrictions) = [ @@ -154,6 +159,7 @@ (_restrict_historical_performance, string_of_bool (not x.enable_performance )); (_restrict_wlb, string_of_bool (not x.enable_wlb )); (_restrict_rbac, string_of_bool (not x.enable_rbac )); + (_restrict_dmc, string_of_bool (not x.enable_dmc )); (_regular_nag_dialog, string_of_bool ( x.regular_nag_dialog )); ] @@ -177,6 +183,7 @@ enable_performance = Opt.default most_permissive.enable_performance (Opt.map not (find bool_of_string _restrict_historical_performance)); enable_wlb = Opt.default most_permissive.enable_wlb (Opt.map not (find bool_of_string _restrict_wlb)); enable_rbac = Opt.default most_permissive.enable_rbac (Opt.map not (find bool_of_string _restrict_rbac)); + enable_dmc = Opt.default most_permissive.enable_dmc (Opt.map not (find bool_of_string _restrict_dmc)); regular_nag_dialog = Opt.default most_permissive.regular_nag_dialog (find bool_of_string _regular_nag_dialog); } @@ -197,6 +204,7 @@ enable_performance = false; enable_wlb = false; enable_rbac = false; + enable_dmc = false; regular_nag_dialog = true; } @@ -217,6 +225,7 @@ enable_performance = true; enable_wlb = true; enable_rbac = true; + enable_dmc = true; regular_nag_dialog = false; } @@ -248,3 +257,6 @@ let license_ok_for_rbac ~__context = (get_pool()).enable_rbac + +let context_ok_for_dmc ~__context = + (get_pool()).enable_dmc diff -r e61b811f0c2c -r 9322132154fe ocaml/license/restrictions.mli --- a/ocaml/license/restrictions.mli Mon Feb 01 15:59:05 2010 +0000 +++ b/ocaml/license/restrictions.mli Mon Feb 01 16:31:16 2010 +0000 @@ -45,6 +45,7 @@ enable_performance : bool; (** used by XenCenter? *) enable_wlb : bool; (** enable Workload Balancing (WLB) *) enable_rbac : bool; (** enable Role-Based Access Control (RBAC) *) + enable_dmc : bool; (** enable Dynamic Memory Control (DMC) *) restrict_connection : bool; (** not used anymore; perhaps XenCenter does? *) platform_filter : bool; (** filter platform data on domain create? *) regular_nag_dialog : bool; (** used by XenCenter *) @@ -82,3 +83,6 @@ (** Checks whether we are entitled to enable Role-Based Access Control (RBAC) in the pool *) val license_ok_for_rbac : __context:'a -> bool +(** Checks whether we are entitled to enable Dynamic Memory Control (DMC) + * in the pool. *) +val context_ok_for_dmc : __context:'a -> bool 2 files changed, 16 insertions(+) ocaml/license/restrictions.ml | 12 ++++++++++++ ocaml/license/restrictions.mli | 4 ++++ Attachment:
xen-api.hg-12.patch _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |