diff --git a/src/device/service/drivers/microwave/IETFApiDriver.py b/src/device/service/drivers/microwave/IETFApiDriver.py index 714a149b6459656cc62c4945da3b2e8d33d0a4e0..0f68445f2e31c32b1f8568e2fd1eb4616fae5c00 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]]: