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 1 of 2] CP-1589: Add restrict_vswitch_controller

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 1 of 2] CP-1589: Add restrict_vswitch_controller
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Thu, 4 Feb 2010 18:23:36 +0000
Delivery-date: Thu, 04 Feb 2010 10:17:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1265307815@xxxxxxxxxxxxxxxxxxxx>
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 Rob Hoes <rob.hoes@xxxxxxxxxx>
# Date 1265307791 0
# Node ID e0dee2a5e88b51c84fc16759ad553db791079182
# Parent  478705141b34cf62fed33fcf138d7843a8637e9b
CP-1589: 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 478705141b34 -r e0dee2a5e88b ocaml/license/restrictions.ml
--- a/ocaml/license/restrictions.ml     Thu Feb 04 18:22:31 2010 +0000
+++ b/ocaml/license/restrictions.ml     Thu Feb 04 18:23:11 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);
   ]
 
@@ -188,6 +194,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;
        }
 
@@ -263,3 +272,6 @@
   
 let context_ok_for_dmc ~__context = 
   (get_pool()).enable_dmc
+
+let license_ok_for_dmc ~__context = 
+  (get_pool()).enable_vswitch_controller
diff -r 478705141b34 -r e0dee2a5e88b ocaml/license/restrictions.mli
--- a/ocaml/license/restrictions.mli    Thu Feb 04 18:22:31 2010 +0000
+++ b/ocaml/license/restrictions.mli    Thu Feb 04 18:23:11 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 *)
2 files changed, 13 insertions(+)
ocaml/license/restrictions.ml  |   12 ++++++++++++
ocaml/license/restrictions.mli |    1 +


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

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