Skip to content
Snippets Groups Projects
Commit 6828d7dd authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component:

- IETF L2VPN Driver: removed force to show emulated devices
- Microwave: correcred parsing of existing services
- Openconfig: corrected gneration of endpoints; added missing retry decorators
parent 9bf07f64
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!71OFC'23 + IETF L2VPN Device Driver + Device Controllers + Multiple small improvements
......@@ -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 = {
......
......@@ -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:
......
......@@ -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)
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment