From afff124ff02a3f296d398c4d31920b5ade33abcb Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Mon, 8 Apr 2024 17:03:40 +0000
Subject: [PATCH] Renamed TeraFlowSDN Debug-API to TFS-API

---
 manifests/nginx_ingress_http.yaml             |  2 +-
 ...pi.sh => run_tests_locally-nbi-tfs-api.sh} |  2 +-
 .../drivers/flexscale/FlexScaleDriver.py      |  8 +--
 .../drivers/ietf_l2vpn/IetfL2VpnDriver.py     |  8 +--
 .../{TfsDebugApiClient.py => TfsApiClient.py} |  6 +--
 src/nbi/.gitlab-ci.yml                        |  2 +-
 src/nbi/service/__main__.py                   |  4 +-
 .../{debug_api => tfs_api}/Resources.py       |  0
 .../{debug_api => tfs_api}/Tools.py           |  0
 .../{debug_api => tfs_api}/__init__.py        |  4 +-
 src/nbi/tests/PrepareTestScenario.py          |  4 +-
 ...ebug_api_dummy.json => tfs_api_dummy.json} |  0
 .../{test_debug_api.py => test_tfs_api.py}    | 50 +++++++++----------
 src/webui/service/templates/main/debug.html   |  8 +--
 14 files changed, 49 insertions(+), 49 deletions(-)
 rename scripts/{run_tests_locally-nbi-debug-api.sh => run_tests_locally-nbi-tfs-api.sh} (96%)
 rename src/device/service/drivers/ietf_l2vpn/{TfsDebugApiClient.py => TfsApiClient.py} (97%)
 rename src/nbi/service/rest_server/nbi_plugins/{debug_api => tfs_api}/Resources.py (100%)
 rename src/nbi/service/rest_server/nbi_plugins/{debug_api => tfs_api}/Tools.py (100%)
 rename src/nbi/service/rest_server/nbi_plugins/{debug_api => tfs_api}/__init__.py (97%)
 rename src/nbi/tests/data/{debug_api_dummy.json => tfs_api_dummy.json} (100%)
 rename src/nbi/tests/{test_debug_api.py => test_tfs_api.py} (83%)

diff --git a/manifests/nginx_ingress_http.yaml b/manifests/nginx_ingress_http.yaml
index 91440fb7a..2b63e5c1c 100644
--- a/manifests/nginx_ingress_http.yaml
+++ b/manifests/nginx_ingress_http.yaml
@@ -43,7 +43,7 @@ spec:
                 name: nbiservice
                 port:
                   number: 8080
-          - path: /()(debug-api/.*)
+          - path: /()(tfs-api/.*)
             pathType: Prefix
             backend:
               service:
diff --git a/scripts/run_tests_locally-nbi-debug-api.sh b/scripts/run_tests_locally-nbi-tfs-api.sh
similarity index 96%
rename from scripts/run_tests_locally-nbi-debug-api.sh
rename to scripts/run_tests_locally-nbi-tfs-api.sh
index 218bad8c5..ee195963b 100755
--- a/scripts/run_tests_locally-nbi-debug-api.sh
+++ b/scripts/run_tests_locally-nbi-tfs-api.sh
@@ -22,4 +22,4 @@ RCFILE=$PROJECTDIR/coverage/.coveragerc
 # Run unitary tests and analyze coverage of code at same time
 # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0
 coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
-    nbi/tests/test_debug_api.py
+    nbi/tests/test_tfs_api.py
diff --git a/src/device/service/drivers/flexscale/FlexScaleDriver.py b/src/device/service/drivers/flexscale/FlexScaleDriver.py
index f91ee1ceb..25a94cad2 100644
--- a/src/device/service/drivers/flexscale/FlexScaleDriver.py
+++ b/src/device/service/drivers/flexscale/FlexScaleDriver.py
@@ -21,7 +21,7 @@ from device.service.driver_api._Driver import _Driver
 from . import ALL_RESOURCE_KEYS
 from .Tools import find_key, add_lightpath, del_lightpath, get_lightpaths
 from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS
-from device.service.drivers.ietf_l2vpn.TfsDebugApiClient import TfsDebugApiClient
+from device.service.drivers.ietf_l2vpn.TfsApiClient import TfsApiClient
 from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology
 
 LOGGER = logging.getLogger(__name__)
@@ -40,7 +40,7 @@ class FlexScaleDriver(_Driver):
         password = self.settings.get('password')
         self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None
         scheme = self.settings.get('scheme', 'http')
-        self.dac = TfsDebugApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password)
+        self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password)
         self.__flexscale_root = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port))
         self.__timeout = int(self.settings.get('timeout', 120))
 
@@ -90,8 +90,8 @@ class FlexScaleDriver(_Driver):
                 chk_string(str_resource_name, resource_key, allow_empty=False)
 
                 if resource_key == RESOURCE_ENDPOINTS:
-                    # return endpoints through debug-api and list-devices method
-                    results.extend(self.dac.get_devices_endpoints(self.__import_topology))
+                    # return endpoints through TFS NBI API and list-devices method
+                    results.extend(self.tac.get_devices_endpoints(self.__import_topology))
 
                 # results.extend(get_lightpaths(
                 #     self.__flexscale_root, resource_key, timeout=self.__timeout, auth=self.__auth))
diff --git a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py
index c79dde99a..07036fcf3 100644
--- a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py
+++ b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py
@@ -20,7 +20,7 @@ from common.tools.object_factory.EndPoint import json_endpoint_id
 from common.type_checkers.Checkers import chk_string, chk_type
 from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_SERVICES
 from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology
-from device.service.drivers.ietf_l2vpn.TfsDebugApiClient import TfsDebugApiClient
+from device.service.drivers.ietf_l2vpn.TfsApiClient import TfsApiClient
 from .Tools import connection_point, wim_mapping
 from .WimconnectorIETFL2VPN import WimconnectorIETFL2VPN
 
@@ -56,7 +56,7 @@ class IetfL2VpnDriver(_Driver):
         wim_account = {'user': username, 'password': password}
         # Mapping updated dynamically with each request
         config = {'mapping_not_needed': False, 'service_endpoint_mapping': []}
-        self.dac = TfsDebugApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password)
+        self.tac = TfsApiClient(self.address, int(self.port), scheme=scheme, username=username, password=password)
         self.wim = WimconnectorIETFL2VPN(wim, wim_account, config=config)
         self.conn_info = {} # internal database emulating OSM storage provided to WIM Connectors
 
@@ -101,8 +101,8 @@ class IetfL2VpnDriver(_Driver):
                 try:
                     chk_string(str_resource_name, resource_key, allow_empty=False)
                     if resource_key == RESOURCE_ENDPOINTS:
-                        # return endpoints through debug-api and list-devices method
-                        results.extend(self.dac.get_devices_endpoints(self.__import_topology))
+                        # return endpoints through TFS NBI API and list-devices method
+                        results.extend(self.tac.get_devices_endpoints(self.__import_topology))
                     elif resource_key == RESOURCE_SERVICES:
                         # return all services through 
                         reply = self.wim.get_all_active_connectivity_services()
diff --git a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py
similarity index 97%
rename from src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py
rename to src/device/service/drivers/ietf_l2vpn/TfsApiClient.py
index 06c55c5dc..70e7ec295 100644
--- a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py
+++ b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py
@@ -17,8 +17,8 @@ from requests.auth import HTTPBasicAuth
 from typing import Dict, List, Optional
 from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum
 
-GET_DEVICES_URL = '{:s}://{:s}:{:d}/restconf/debug-api/devices'
-GET_LINKS_URL   = '{:s}://{:s}:{:d}/restconf/debug-api/links'
+GET_DEVICES_URL = '{:s}://{:s}:{:d}/tfs-api/devices'
+GET_LINKS_URL   = '{:s}://{:s}:{:d}/tfs-api/links'
 TIMEOUT = 30
 
 HTTP_OK_CODES = {
@@ -51,7 +51,7 @@ MSG_ERROR = 'Could not retrieve devices in remote TeraFlowSDN instance({:s}). st
 
 LOGGER = logging.getLogger(__name__)
 
-class TfsDebugApiClient:
+class TfsApiClient:
     def __init__(
         self, address : str, port : int, scheme : str = 'http',
         username : Optional[str] = None, password : Optional[str] = None
diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml
index 2f7110202..219e90132 100644
--- a/src/nbi/.gitlab-ci.yml
+++ b/src/nbi/.gitlab-ci.yml
@@ -66,7 +66,7 @@ unit_test nbi:
     - sleep 5
     - docker ps -a
     - docker logs $IMAGE_NAME
-    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_debug_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_debug_api.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_tfs_api.py --junitxml=/opt/results/${IMAGE_NAME}_report_tfs_api.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l2vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l2vpn.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml"
     - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml"
diff --git a/src/nbi/service/__main__.py b/src/nbi/service/__main__.py
index 8834e45a2..1ccacd6d3 100644
--- a/src/nbi/service/__main__.py
+++ b/src/nbi/service/__main__.py
@@ -20,12 +20,12 @@ from common.Settings import (
     wait_for_environment_variables)
 from .NbiService import NbiService
 from .rest_server.RestServer import RestServer
-from .rest_server.nbi_plugins.debug_api import register_debug_api
 from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api
 from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn
 from .rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn
 from .rest_server.nbi_plugins.ietf_network import register_ietf_network
 from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss
+from .rest_server.nbi_plugins.tfs_api import register_tfs_api
 
 terminate = threading.Event()
 LOGGER = None
@@ -62,12 +62,12 @@ def main():
     grpc_service.start()
 
     rest_server = RestServer()
-    register_debug_api(rest_server)
     register_etsi_bwm_api(rest_server)
     register_ietf_l2vpn(rest_server)  # Registering L2VPN entrypoint
     register_ietf_l3vpn(rest_server)  # Registering L3VPN entrypoint
     register_ietf_network(rest_server)
     register_ietf_nss(rest_server)  # Registering NSS entrypoint
+    register_tfs_api(rest_server)
     rest_server.start()
 
     # Wait for Ctrl+C or termination signal
diff --git a/src/nbi/service/rest_server/nbi_plugins/debug_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py
similarity index 100%
rename from src/nbi/service/rest_server/nbi_plugins/debug_api/Resources.py
rename to src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py
diff --git a/src/nbi/service/rest_server/nbi_plugins/debug_api/Tools.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py
similarity index 100%
rename from src/nbi/service/rest_server/nbi_plugins/debug_api/Tools.py
rename to src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py
diff --git a/src/nbi/service/rest_server/nbi_plugins/debug_api/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py
similarity index 97%
rename from src/nbi/service/rest_server/nbi_plugins/debug_api/__init__.py
rename to src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py
index 1ccf93144..cc622e1f9 100644
--- a/src/nbi/service/rest_server/nbi_plugins/debug_api/__init__.py
+++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py
@@ -25,7 +25,7 @@ from .Resources import (
     Topologies, Topology, TopologyIds
 )
 
-URL_PREFIX = '/debug-api'
+URL_PREFIX = '/tfs-api'
 
 # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type.
 RESOURCES = [
@@ -64,6 +64,6 @@ RESOURCES = [
     ('api.policyrule',     PolicyRule,    '/policyrule/<path:policyrule_uuid>'),
 ]
 
-def register_debug_api(rest_server : RestServer):
+def register_tfs_api(rest_server : RestServer):
     for endpoint_name, resource_class, resource_url in RESOURCES:
         rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name)
diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py
index 461245e09..ab477fb0b 100644
--- a/src/nbi/tests/PrepareTestScenario.py
+++ b/src/nbi/tests/PrepareTestScenario.py
@@ -21,11 +21,11 @@ from common.Settings import (
 )
 from context.client.ContextClient import ContextClient
 from nbi.service.rest_server.RestServer import RestServer
-from nbi.service.rest_server.nbi_plugins.debug_api import register_debug_api
 from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api
 from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn
 from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn
 from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network
+from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api
 from nbi.tests.MockService_Dependencies import MockService_Dependencies
 from service.client.ServiceClient import ServiceClient
 from slice.client.SliceClient import SliceClient
@@ -49,11 +49,11 @@ def mock_service():
 @pytest.fixture(scope='session')
 def nbi_service_rest(mock_service : MockService_Dependencies):  # pylint: disable=redefined-outer-name, unused-argument
     _rest_server = RestServer()
-    register_debug_api(_rest_server)
     register_etsi_bwm_api(_rest_server)
     register_ietf_l2vpn(_rest_server)
     register_ietf_l3vpn(_rest_server)
     register_ietf_network(_rest_server)
+    register_tfs_api(_rest_server)
     _rest_server.start()
     time.sleep(1) # bring time for the server to start
     yield _rest_server
diff --git a/src/nbi/tests/data/debug_api_dummy.json b/src/nbi/tests/data/tfs_api_dummy.json
similarity index 100%
rename from src/nbi/tests/data/debug_api_dummy.json
rename to src/nbi/tests/data/tfs_api_dummy.json
diff --git a/src/nbi/tests/test_debug_api.py b/src/nbi/tests/test_tfs_api.py
similarity index 83%
rename from src/nbi/tests/test_debug_api.py
rename to src/nbi/tests/test_tfs_api.py
index f19531eae..91aa64b4e 100644
--- a/src/nbi/tests/test_debug_api.py
+++ b/src/nbi/tests/test_tfs_api.py
@@ -39,7 +39,7 @@ from .PrepareTestScenario import ( # pylint: disable=unused-import
 LOGGER = logging.getLogger(__name__)
 LOGGER.setLevel(logging.DEBUG)
 
-DESCRIPTOR_FILE = 'nbi/tests/data/debug_api_dummy.json'
+DESCRIPTOR_FILE = 'nbi/tests/data/tfs_api_dummy.json'
 
 JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME)
 ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID)
@@ -64,16 +64,16 @@ def test_prepare_environment(context_client : ContextClient) -> None: # pylint:
 # ----- Context --------------------------------------------------------------------------------------------------------
 
 def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument
-    reply = do_rest_get_request('/debug-api/context_ids')
+    reply = do_rest_get_request('/tfs-api/context_ids')
     validate_context_ids(reply)
 
 def test_rest_get_contexts(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
-    reply = do_rest_get_request('/debug-api/contexts')
+    reply = do_rest_get_request('/tfs-api/contexts')
     validate_contexts(reply)
 
 def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}'.format(context_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}'.format(context_uuid))
     validate_context(reply)
 
 
@@ -81,50 +81,50 @@ def test_rest_get_context(nbi_service_rest : RestServer): # pylint: disable=rede
 
 def test_rest_get_topology_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}/topology_ids'.format(context_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/topology_ids'.format(context_uuid))
     validate_topology_ids(reply)
 
 def test_rest_get_topologies(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}/topologies'.format(context_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/topologies'.format(context_uuid))
     validate_topologies(reply)
 
 def test_rest_get_topology(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
     topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/topology/{:s}'.format(context_uuid, topology_uuid))
     validate_topology(reply, num_devices=3, num_links=6)
 
 
 # ----- Device ---------------------------------------------------------------------------------------------------------
 
 def test_rest_get_device_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
-    reply = do_rest_get_request('/debug-api/device_ids')
+    reply = do_rest_get_request('/tfs-api/device_ids')
     validate_device_ids(reply)
 
 def test_rest_get_devices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
-    reply = do_rest_get_request('/debug-api/devices')
+    reply = do_rest_get_request('/tfs-api/devices')
     validate_devices(reply)
 
 def test_rest_get_device(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     device_uuid = urllib.parse.quote('R1', safe='')
-    reply = do_rest_get_request('/debug-api/device/{:s}'.format(device_uuid))
+    reply = do_rest_get_request('/tfs-api/device/{:s}'.format(device_uuid))
     validate_device(reply)
 
 
 # ----- Link -----------------------------------------------------------------------------------------------------------
 
 def test_rest_get_link_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
-    reply = do_rest_get_request('/debug-api/link_ids')
+    reply = do_rest_get_request('/tfs-api/link_ids')
     validate_link_ids(reply)
 
 def test_rest_get_links(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
-    reply = do_rest_get_request('/debug-api/links')
+    reply = do_rest_get_request('/tfs-api/links')
     validate_links(reply)
 
 def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     link_uuid = urllib.parse.quote('R1/502==R2/501', safe='')
-    reply = do_rest_get_request('/debug-api/link/{:s}'.format(link_uuid))
+    reply = do_rest_get_request('/tfs-api/link/{:s}'.format(link_uuid))
     validate_link(reply)
 
 
@@ -132,18 +132,18 @@ def test_rest_get_link(nbi_service_rest : RestServer): # pylint: disable=redefin
 
 def test_rest_get_service_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}/service_ids'.format(context_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/service_ids'.format(context_uuid))
     validate_service_ids(reply)
 
 def test_rest_get_services(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}/services'.format(context_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/services'.format(context_uuid))
     validate_services(reply)
 
 def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
     service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='')
-    reply = do_rest_get_request('/debug-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}'.format(context_uuid, service_uuid))
     validate_service(reply)
 
 
@@ -151,18 +151,18 @@ def test_rest_get_service(nbi_service_rest : RestServer): # pylint: disable=rede
 
 def test_rest_get_slice_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}/slice_ids'.format(context_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/slice_ids'.format(context_uuid))
     validate_slice_ids(reply)
 
 def test_rest_get_slices(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
-    reply = do_rest_get_request('/debug-api/context/{:s}/slices'.format(context_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/slices'.format(context_uuid))
     validate_slices(reply)
 
 def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
     slice_uuid = urllib.parse.quote('SLC:R1-R2-R3', safe='')
-    reply = do_rest_get_request('/debug-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/slice/{:s}'.format(context_uuid, slice_uuid))
     validate_slice(reply)
 
 
@@ -171,33 +171,33 @@ def test_rest_get_slice(nbi_service_rest : RestServer): # pylint: disable=redefi
 def test_rest_get_connection_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
     service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='')
-    reply = do_rest_get_request('/debug-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connection_ids'.format(context_uuid, service_uuid))
     validate_connection_ids(reply)
 
 def test_rest_get_connections(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME)
     service_uuid = urllib.parse.quote('SVC:R1/200==R2/200', safe='')
-    reply = do_rest_get_request('/debug-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid))
+    reply = do_rest_get_request('/tfs-api/context/{:s}/service/{:s}/connections'.format(context_uuid, service_uuid))
     validate_connections(reply)
 
 def test_rest_get_connection(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
     connection_uuid = urllib.parse.quote('CON:R1/200==R2/200:1', safe='')
-    reply = do_rest_get_request('/debug-api/connection/{:s}'.format(connection_uuid))
+    reply = do_rest_get_request('/tfs-api/connection/{:s}'.format(connection_uuid))
     validate_connection(reply)
 
 # ----- Policy ---------------------------------------------------------------------------------------------------------
 
 #def test_rest_get_policyrule_ids(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
-#    reply = do_rest_get_request('/debug-api/policyrule_ids')
+#    reply = do_rest_get_request('/tfs-api/policyrule_ids')
 #    validate_policyrule_ids(reply)
 
 #def test_rest_get_policyrules(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
-#    reply = do_rest_get_request('/debug-api/policyrules')
+#    reply = do_rest_get_request('/tfs-api/policyrules')
 #    validate_policyrules(reply)
 
 #def test_rest_get_policyrule(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument
 #    policyrule_uuid_quoted = urllib.parse.quote(policyrule_uuid, safe='')
-#    reply = do_rest_get_request('/debug-api/policyrule/{:s}'.format(policyrule_uuid_quoted))
+#    reply = do_rest_get_request('/tfs-api/policyrule/{:s}'.format(policyrule_uuid_quoted))
 #    validate_policyrule(reply)
 
 
diff --git a/src/webui/service/templates/main/debug.html b/src/webui/service/templates/main/debug.html
index a6964d588..f6ec5a501 100644
--- a/src/webui/service/templates/main/debug.html
+++ b/src/webui/service/templates/main/debug.html
@@ -20,10 +20,10 @@
     <h1>Debug API</h1>
 
     <ul>
-        <li><a class="nav-link" href="/debug-api/contexts" id="contexts_link" target="contexts">Contexts</a></li>
-        <li><a class="nav-link" href="/debug-api/dummy_contexts" id="dummy_contexts_link" target="dummy_contexts">Dummy Contexts</a></li>
-        <li><a class="nav-link" href="/debug-api/devices" id="devices_link" target="devices">Devices</a></li>
-        <li><a class="nav-link" href="/debug-api/links" id="links_link" target="links">Links</a></li>
+        <li><a class="nav-link" href="/tfs-api/contexts" id="contexts_link" target="contexts">Contexts</a></li>
+        <li><a class="nav-link" href="/tfs-api/dummy_contexts" id="dummy_contexts_link" target="dummy_contexts">Dummy Contexts</a></li>
+        <li><a class="nav-link" href="/tfs-api/devices" id="devices_link" target="devices">Devices</a></li>
+        <li><a class="nav-link" href="/tfs-api/links" id="links_link" target="links">Links</a></li>
     </ul>
 
 {% endblock %}
-- 
GitLab