[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] Add restrict_vswitch_controller


  • To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: Rob Hoes <rob.hoes@xxxxxxxxxx>
  • Date: Mon, 1 Feb 2010 17:11:53 +0000
  • Delivery-date: Mon, 01 Feb 2010 09:11:56 -0800
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

# HG changeset patch
# User Rob Hoes <rob.hoes@xxxxxxxxxx>
Add restrict_vswitch_controller

Include a restrictions option to control the use of the vswitch controller.

Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>

diff -r 644953ba4af5 ocaml/license/restrictions.ml
--- a/ocaml/license/restrictions.ml     Mon Feb 01 17:09:17 2010 +0000
+++ b/ocaml/license/restrictions.ml     Mon Feb 01 17:10:55 2010 +0000
@@ -53,6 +53,7 @@
        enable_wlb : bool;
        enable_rbac : bool;
        enable_dmc : bool;
+       enable_vswitch_controller : bool;
        restrict_connection : bool;
        platform_filter : bool;
        regular_nag_dialog : bool;
@@ -74,6 +75,7 @@
                "WLB"     ,     x.enable_wlb           ;
                "RBAC"    ,     x.enable_rbac          ;
                "DMC"     ,     x.enable_dmc           ;
+               "DVSC"    ,     x.enable_vswitch_controller;
                "Cnx"     , not x.restrict_connection  ;
                "Plat"    , not x.platform_filter      ;
                "nag"     ,     x.regular_nag_dialog   ;
@@ -97,6 +99,7 @@
        enable_wlb            = true;
        enable_rbac           = true;
        enable_dmc            = true;
+       enable_vswitch_controller = true;
        restrict_connection   = false;
        platform_filter       = false;
        regular_nag_dialog    = false;
@@ -118,6 +121,7 @@
        enable_wlb            = a.enable_wlb            && b.enable_wlb;
        enable_rbac           = a.enable_rbac           && b.enable_rbac;
        enable_dmc            = a.enable_dmc            && b.enable_dmc;
+       enable_vswitch_controller = a.enable_vswitch_controller && 
b.enable_vswitch_controller;
        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;
@@ -147,6 +151,7 @@
 let _restrict_wlb = "restrict_wlb"
 let _restrict_rbac = "restrict_rbac"
 let _restrict_dmc = "restrict_dmc"
+let _restrict_vswitch_controller = "restrict_vswitch_controller"
 let _regular_nag_dialog = "regular_nag_dialog"
 
 let to_assoc_list (x: restrictions) = [
@@ -165,6 +170,7 @@
        (_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     
      ));
+       (_restrict_vswitch_controller,     string_of_bool (not 
x.enable_vswitch_controller ));
        (_regular_nag_dialog,              string_of_bool (    
x.regular_nag_dialog   ));
 ]
 
@@ -189,6 +195,7 @@
                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));
+               enable_vswitch_controller = Opt.default 
most_permissive.enable_dmc            (Opt.map not (find bool_of_string 
_restrict_vswitch_controller));
                regular_nag_dialog    = Opt.default 
most_permissive.regular_nag_dialog                 (find bool_of_string 
_regular_nag_dialog);
        }
 
@@ -210,6 +217,7 @@
        enable_wlb            = false;
        enable_rbac           = false;
        enable_dmc            = false;
+       enable_vswitch_controller = false;
        regular_nag_dialog    = true;
 }
 
@@ -231,6 +239,7 @@
                        enable_wlb         = true;
                        enable_rbac        = true;
                        enable_dmc         = true;
+                       enable_vswitch_controller = true;
                        regular_nag_dialog = false;
                }
 
@@ -268,3 +277,7 @@
 
 let context_ok_for_dmc ~__context =
        (get_pool()).enable_dmc
+       
+let license_ok_for_vswitch_controller ~__context =
+       (get_pool()).enable_vswitch_controller
+       
diff -r 644953ba4af5 ocaml/license/restrictions.mli
--- a/ocaml/license/restrictions.mli    Mon Feb 01 17:09:17 2010 +0000
+++ b/ocaml/license/restrictions.mli    Mon Feb 01 17:10:55 2010 +0000
@@ -46,6 +46,7 @@
        enable_wlb            : bool; (** enable Workload Balancing (WLB) *)
        enable_rbac           : bool; (** enable Role-Based Access Control 
(RBAC) *)
        enable_dmc            : bool; (** enable Dynamic Memory Control (DMC) *)
+       enable_vswitch_controller : bool; (** enable use of a Distributed 
VSwitch (DVS) Controller *)
        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 *)

Attachment: vswitch-restrictions
Description: Text document

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.