From b100a61c50f9313bb2091ac8f5813c189a838441 Mon Sep 17 00:00:00 2001
From: Bjarke Madsen <bjarke.madsen@geant.org>
Date: Fri, 19 Feb 2021 13:49:35 +0100
Subject: [PATCH] hardcode organization config

---
 brian_dashboard_manager/config.py | 40 +++++++++++++++++++++++++++----
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/brian_dashboard_manager/config.py b/brian_dashboard_manager/config.py
index e97ce11..a7aa274 100644
--- a/brian_dashboard_manager/config.py
+++ b/brian_dashboard_manager/config.py
@@ -1,6 +1,40 @@
 import json
 import jsonschema
 
+DEFAULT_ORGANIZATIONS = [
+    {
+        "name": "Main Org.",
+        "excluded_nrens": [],
+        "excluded_dashboards": []
+    },
+    {
+        "name": "GÉANT Staff",
+        "excluded_nrens": [],
+        "excluded_dashboards": []
+    },
+    {
+        "name": "NRENs",
+        "excluded_nrens": [],
+        "excluded_dashboards": []
+    },
+    {
+        "name": "General Public",
+        "excluded_nrens": [
+                "JISC",
+                "PSNC"
+        ],
+        "excluded_dashboards": []
+    },
+    {
+        "name": "CAE1 - Europe",
+        "excluded_nrens": [
+                "JISC",
+                "PSNC"
+        ],
+        "excluded_dashboards": []
+    }
+]
+
 CONFIG_SCHEMA = {
     "$schema": "http://json-schema.org/draft-07/schema#",
 
@@ -52,7 +86,6 @@ CONFIG_SCHEMA = {
         "hostname": {"type": "string"},
         "listen_port": {"type": "integer"},
         "inventory_provider": {"type": "string"},
-        "organizations": {"type": "array", "items": {"$ref": "#definitions/organization"}},
         "datasources": {
             "type": "object",
             "properties": {
@@ -66,10 +99,8 @@ CONFIG_SCHEMA = {
         "admin_password",
         "hostname",
         "inventory_provider",
-        "organizations",
         "datasources"
-    ],
-    "additionalProperties": False
+    ]
 }
 
 
@@ -79,7 +110,6 @@ def defaults():
         "admin_password": "admin",
         "hostname": "localhost:3000",
         "listen_port": 3001,
-        "organizations": ["Main Org."],
         "datasources": {}
     }
 
-- 
GitLab