From 7a84ea8d65b8c7b9c898e2148f1275eb0cee4e1b Mon Sep 17 00:00:00 2001
From: Roberto Rubino <roberto.rubino@siaemic.com>
Date: Mon, 16 May 2022 15:46:16 +0000
Subject: [PATCH] double checked name of variable __ietf_root

---
 .../service/drivers/microwave/IETFApiDriver.py     | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/device/service/drivers/microwave/IETFApiDriver.py b/src/device/service/drivers/microwave/IETFApiDriver.py
index 714a149b6..0f68445f2 100644
--- a/src/device/service/drivers/microwave/IETFApiDriver.py
+++ b/src/device/service/drivers/microwave/IETFApiDriver.py
@@ -26,20 +26,20 @@ class IETFApiDriver(_Driver):
         self.__lock = threading.Lock()
         self.__started = threading.Event()
         self.__terminate = threading.Event()
-        self.__tapi_root = 'https://' + address + ':' + str(port)
+        self.__ietf_root = 'https://' + address + ':' + str(port)
         self.__timeout = int(settings.get('timeout', 120))
 
     def Connect(self) -> bool:
-        url = self.__tapi_root + '/nmswebs/restconf/data/ietf-network:networks'
+        url = self.__ietf_root + '/nmswebs/restconf/data/ietf-network:networks'
         with self.__lock:
             if self.__started.is_set(): return True
             try:
                 requests.get(url, timeout=self.__timeout, verify=False)
             except requests.exceptions.Timeout:
-                LOGGER.exception('Timeout connecting {:s}'.format(str(self.__tapi_root)))
+                LOGGER.exception('Timeout connecting {:s}'.format(str(self.__ietf_root)))
                 return False
             except Exception:  # pylint: disable=broad-except
-                LOGGER.exception('Exception connecting {:s}'.format(str(self.__tapi_root)))
+                LOGGER.exception('Exception connecting {:s}'.format(str(self.__ietf_root)))
                 return False
             else:
                 self.__started.set()
@@ -62,7 +62,7 @@ class IETFApiDriver(_Driver):
             for i, resource_key in enumerate(resource_keys):
                 str_resource_name = 'resource_key[#{:d}]'.format(i)
                 chk_string(str_resource_name, resource_key, allow_empty=False)
-                results.extend(config_getter(self.__tapi_root, resource_key, self.__timeout))
+                results.extend(config_getter(self.__ietf_root, resource_key, self.__timeout))
         return results
 
 
@@ -82,7 +82,7 @@ class IETFApiDriver(_Driver):
                 uuid = find_key(resource, 'uuid')
 
                 data = create_connectivity_service(
-                    self.__tapi_root, self.__timeout, uuid, node_id_src, tp_id_src, node_id_dst, tp_id_dst, vlan_id)
+                    self.__ietf_root, self.__timeout, uuid, node_id_src, tp_id_src, node_id_dst, tp_id_dst, vlan_id)
                 results.extend(data)
         return results
 
@@ -94,7 +94,7 @@ class IETFApiDriver(_Driver):
             for resource in resources:
                 LOGGER.info('resource = {:s}'.format(str(resource)))
                 uuid = find_key(resource, 'uuid')
-                results.extend(delete_connectivity_service(self.__tapi_root, self.__timeout, uuid))
+                results.extend(delete_connectivity_service(self.__ietf_root, self.__timeout, uuid))
         return results
 
     def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]:
-- 
GitLab