diff --git a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py index f8c4e0d94a8f84e1af49d19bc44d168673722e34..4bf40af030fda990f96efe0ff8ab2ce54f82c312 100644 --- a/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py +++ b/src/device/service/drivers/ietf_l2vpn/TfsDebugApiClient.py @@ -66,7 +66,7 @@ class TfsDebugApiClient: for json_device in reply.json()['devices']: device_uuid : str = json_device['device_id']['device_uuid']['uuid'] device_type : str = json_device['device_type'] - if not device_type.startswith('emu-'): device_type = 'emu-' + device_type + #if not device_type.startswith('emu-'): device_type = 'emu-' + device_type device_status = json_device['device_operational_status'] device_url = '/devices/device[{:s}]'.format(device_uuid) device_data = { diff --git a/src/device/service/drivers/microwave/Tools.py b/src/device/service/drivers/microwave/Tools.py index 6245ff0af362f8b6e3d66b752f4d3e2625b95996..4490c0f63fe6a517e5f31a5acd62208013bbaad0 100644 --- a/src/device/service/drivers/microwave/Tools.py +++ b/src/device/service/drivers/microwave/Tools.py @@ -119,8 +119,14 @@ def config_getter( resource_value['node_id_dst'] = access_point['access-node-id'] resource_value['tp_id_dst'] = access_point['access-ltp-id'] - if len(node_ids) > 0 and resource_value['node_id_src'] not in node_ids: continue - if len(node_ids) > 0 and resource_value['node_id_dst'] not in node_ids: continue + if len(node_ids) > 0: + node_id_src = resource_value.get('node_id_src') + if node_id_src is None: continue + if node_id_src not in node_ids: continue + + node_id_dst = resource_value.get('node_id_dst') + if node_id_dst is None: continue + if node_id_dst not in node_ids: continue result.append((resource_key, resource_value)) except requests.exceptions.Timeout: diff --git a/src/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py index ac03527529b603089c4f8233cb185f6427e0c360..569a0400ee709ebe3b0fa0694dd80801efc4f7fa 100644 --- a/src/device/service/drivers/openconfig/OpenConfigDriver.py +++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py @@ -113,9 +113,11 @@ class NetconfSessionHandler: config, target=target, default_operation=default_operation, test_option=test_option, error_option=error_option, format=format) + @RETRY_DECORATOR def locked(self, target): return self.__manager.locked(target=target) + @RETRY_DECORATOR def commit(self, confirmed=False, timeout=None, persist=None, persist_id=None): return self.__manager.commit(confirmed=confirmed, timeout=timeout, persist=persist, persist_id=persist_id) diff --git a/src/device/service/drivers/openconfig/templates/EndPoints.py b/src/device/service/drivers/openconfig/templates/EndPoints.py index 02fda8f0e195c267fddb1109f184c8a06e4a6787..f16f0ffcd09a07f6c109328b1c5f0ee101af545a 100644 --- a/src/device/service/drivers/openconfig/templates/EndPoints.py +++ b/src/device/service/drivers/openconfig/templates/EndPoints.py @@ -55,5 +55,5 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: add_value_from_collection(endpoint, 'sample_types', sample_types) if len(endpoint) == 0: continue - response.append(('/endpoint[{:s}]'.format(endpoint['uuid']), endpoint)) + response.append(('/endpoints/endpoint[{:s}]'.format(endpoint['uuid']), endpoint)) return response