diff --git a/brian_dashboard_manager/config.py b/brian_dashboard_manager/config.py index 83840e871392e7ed12406bdd43adc6740ffcaff8..c5a828e0573c376726a1ad02e6d8655eb2d9dbbc 100644 --- a/brian_dashboard_manager/config.py +++ b/brian_dashboard_manager/config.py @@ -1,3 +1,32 @@ +""" +This file loads the configuration used for the dashboard manager. + +The config is stored in a JSON format on the filesystem, +with the following schema: + +.. asjson:: + brian_dashboard_manager.config.CONFIG_SCHEMA + + +Some config specific to each organization is hardcoded. +This includes which organizations to provision, +and which dashboards not to provision for each organization: + +`excluded_nrens` is a list of strings to search for in interface descriptions +to exclude for that organization. + +`excluded_dashboards` is a list of dashboard names to exclude. +These only cover the static dashboards loaded from the file system. + +`excluded_folders` covers dynamically generated folders and dashboards. +This property is a mapping of folder name to `True` or a list of dashboards. +A value of `True` should result in that folder being excluded. +If the value is a list, dashboard titles within the list should be excluded. + +.. asjson:: + brian_dashboard_manager.config.DEFAULT_ORGANIZATIONS +""" + import json import jsonschema @@ -5,7 +34,8 @@ DEFAULT_ORGANIZATIONS = [ { "name": "GÉANT Staff", "excluded_nrens": [], - "excluded_dashboards": [] + "excluded_dashboards": [], + "excluded_folders": {} }, { "name": "NRENs", @@ -13,7 +43,11 @@ DEFAULT_ORGANIZATIONS = [ "excluded_dashboards": [ "GÉANT Office devices", "GÉANT VM" - ] + ], + "excluded_folders": { + "Aggregates": ["CAE1"], + "GEANTOPEN": True + } }, { "name": "General Public", @@ -23,8 +57,17 @@ DEFAULT_ORGANIZATIONS = [ ], "excluded_dashboards": [ "GÉANT Office devices", - "GÉANT VM" - ] + "GÉANT VM", + "IAS", + "GEANTOPEN" + ], + "excluded_folders": { + "Aggregates": ["CAE1", "GWS UPSTREAMS"], + "IAS CUSTOMER": True, + "IAS PRIVATE": True, + "IAS PUBLIC": True, + "IAS UPSTREAM": True + } }, { "name": "CAE1 - Europe", @@ -32,7 +75,8 @@ DEFAULT_ORGANIZATIONS = [ "excluded_dashboards": [ "GÉANT Office devices", "GÉANT VM" - ] + ], + "excluded_folders": {} }, { "name": "CAE1 - Asia", @@ -42,8 +86,16 @@ DEFAULT_ORGANIZATIONS = [ ], "excluded_dashboards": [ "GÉANT Office devices", - "GÉANT VM" - ] + "GÉANT VM", + "IAS" + ], + "excluded_folders": { + "Aggregates": ["GWS UPSTREAMS"], + "IAS CUSTOMER": True, + "IAS PRIVATE": True, + "IAS PUBLIC": True, + "IAS UPSTREAM": True + } } ]