Loading src/device/service/drivers/oc_driver/templates/VPN/roadms.py +41 −41 Original line number Diff line number Diff line Loading @@ -137,14 +137,14 @@ def create_media_channel_v2 (resources): config,ports,index=filter_config(resources,unwanted_keys) n = 0 for flow in ports: doc, tag, text = Doc().tagtext() with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): with tag('media-channels'): n = 0 for flow in ports: src,dest=flow with tag('channel', operation="create"): #with tag('channel'): Loading src/service/service/service_handlers/oc/OCTools.py +9 −7 Original line number Diff line number Diff line Loading @@ -236,10 +236,10 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entries[device_uuid] = [] entry_tuple = "0", endpoint_uuid entries[device_uuid].append(entry_tuple) i = i + 1 i = i + 2 #if bidir reading 4 endpoints per node if bidir: while(i < end-1): while(i < end-2): #i endpoint = endpoints[i] device_uuid, endpoint_uuid = endpoint[0:2] Loading @@ -253,10 +253,11 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entry_tuple = endpoint_uuid, next_endpoint_uuid entries[device_uuid].append(entry_tuple) else: log.info("ERROR in bidirectional ob") log.debug("{}, {}, {}".format(i, next_device_uuid, device_uuid)) log.info(f"ERROR1 in bidirectional connection ") log.info("{}, {}, {}".format(i+2, next_device_uuid, device_uuid)) return {} #i+2 next_2_endpoint = endpoints[i+2] next_2_device_uuid, next_2_endpoint_uuid = next_2_endpoint[0:2] #i+3 Loading @@ -267,7 +268,8 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entries[device_uuid].append(entry_tuple) i = i + 4 else: log.info("ERROR in bidirection ob") log.info("ERROR2 in bidirection connection") log.info("{}, {}, {}".format(i+4, next_2_device_uuid, device_uuid)) return {} else: while(i < end-1): Loading @@ -285,8 +287,8 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entries[device_uuid].append(entry_tuple) i = i + 2 else: log.debug("ERROR in bidirectional ob") log.debug("{}, {}, {}".format(i, next_device_uuid, device_uuid)) log.info("ERROR3 in bidirectional ob") log.info("{}, {}, {}".format(i, next_device_uuid, device_uuid)) return {} #rx tp endpoint = endpoints[i] Loading Loading
src/device/service/drivers/oc_driver/templates/VPN/roadms.py +41 −41 Original line number Diff line number Diff line Loading @@ -137,14 +137,14 @@ def create_media_channel_v2 (resources): config,ports,index=filter_config(resources,unwanted_keys) n = 0 for flow in ports: doc, tag, text = Doc().tagtext() with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): with tag('media-channels'): n = 0 for flow in ports: src,dest=flow with tag('channel', operation="create"): #with tag('channel'): Loading
src/service/service/service_handlers/oc/OCTools.py +9 −7 Original line number Diff line number Diff line Loading @@ -236,10 +236,10 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entries[device_uuid] = [] entry_tuple = "0", endpoint_uuid entries[device_uuid].append(entry_tuple) i = i + 1 i = i + 2 #if bidir reading 4 endpoints per node if bidir: while(i < end-1): while(i < end-2): #i endpoint = endpoints[i] device_uuid, endpoint_uuid = endpoint[0:2] Loading @@ -253,10 +253,11 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entry_tuple = endpoint_uuid, next_endpoint_uuid entries[device_uuid].append(entry_tuple) else: log.info("ERROR in bidirectional ob") log.debug("{}, {}, {}".format(i, next_device_uuid, device_uuid)) log.info(f"ERROR1 in bidirectional connection ") log.info("{}, {}, {}".format(i+2, next_device_uuid, device_uuid)) return {} #i+2 next_2_endpoint = endpoints[i+2] next_2_device_uuid, next_2_endpoint_uuid = next_2_endpoint[0:2] #i+3 Loading @@ -267,7 +268,8 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entries[device_uuid].append(entry_tuple) i = i + 4 else: log.info("ERROR in bidirection ob") log.info("ERROR2 in bidirection connection") log.info("{}, {}, {}".format(i+4, next_2_device_uuid, device_uuid)) return {} else: while(i < end-1): Loading @@ -285,8 +287,8 @@ def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): entries[device_uuid].append(entry_tuple) i = i + 2 else: log.debug("ERROR in bidirectional ob") log.debug("{}, {}, {}".format(i, next_device_uuid, device_uuid)) log.info("ERROR3 in bidirectional ob") log.info("{}, {}, {}".format(i, next_device_uuid, device_uuid)) return {} #rx tp endpoint = endpoints[i] Loading