From 7671453a70011e8edd507bdc68b988b0e4608892 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Mon, 24 Jul 2023 09:33:29 +0200
Subject: [PATCH] Revert "added template site param handling"

This reverts commit 0f5b13cabdb47e5b9d3c40305172f1b4d6cea709.
---
 gso/services/resource_manager.py | 36 ++++++++------------------------
 1 file changed, 9 insertions(+), 27 deletions(-)

diff --git a/gso/services/resource_manager.py b/gso/services/resource_manager.py
index 5c242400..6962eefe 100644
--- a/gso/services/resource_manager.py
+++ b/gso/services/resource_manager.py
@@ -1,6 +1,6 @@
 # mypy: ignore-errors
 from enum import Enum, auto
-from typing import List, Set
+from typing import List
 
 from gso import settings
 
@@ -16,45 +16,27 @@ class InterfaceAllocationState(Enum):
     ALLOCATED = auto()
 
 
-def _dummy_router_interfaces(site_name) -> dict:
+def _dummy_router_interfaces():
     return {
-        "site": site_name,
         "lags": [],
         "physical": [{"name": f"ifc-{x}", "state": InterfaceAllocationState.AVAILABLE} for x in range(250)],
     }
 
-_DUMMY_SITES = {
-    "site-a",
-    "site-b",
-    "site-c"
-}
 
 _DUMMY_INVENTORY = {
-    "fqdn-a": _dummy_router_interfaces("site-a"),
-    "fqdn-b": _dummy_router_interfaces("site-a"),
-    "fqdn-c": _dummy_router_interfaces("site-b"),
-    "fqdn-d": _dummy_router_interfaces("site-b"),
-    "fqdn-e": _dummy_router_interfaces("site-c"),
-    "fqdn-f": _dummy_router_interfaces("site-c")
+    "fqdn-a": _dummy_router_interfaces(),
+    "fqdn-b": _dummy_router_interfaces(),
+    "fqdn-c": _dummy_router_interfaces(),
+    "fqdn-d": _dummy_router_interfaces(),
 }
 
 
-def import_new_site(new_site_name: str, oss_params=settings.OSSParams):
-    # TODO: this is a dummy implementation
-    assert new_site_name not in _DUMMY_SITES
-    _DUMMY_SITES.add(new_site_name)
-
-
-def import_new_router(
-        new_router_fqdn: str,
-        site_name: str,
-        oss_params=settings.OSSParams):
+def import_new_router(new_router_fqdn: str, oss_params=settings.OSSParams):
     # TODO: this is a dummy implementation
 
-    # TODO: specify if this should be an error (and if not, what it means)
-    assert site_name in _DUMMY_SITES
+    # TODO: specifiy if this should be an error (and if now, what it means)
     assert new_router_fqdn not in _DUMMY_INVENTORY
-    _DUMMY_INVENTORY[new_router_fqdn] = _dummy_router_interfaces(site_name)
+    _DUMMY_INVENTORY[new_router_fqdn] = _dummy_router_interfaces()
 
 
 def next_lag(router_fqdn: str, oss_params=settings.OSSParams) -> str:
-- 
GitLab