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

PathComp component:

- Added logic to extrapolate underlyign connections for remote domains
parent a8c7843a
Branches
Tags
2 merge requests!142Release TeraFlowSDN 2.1,!119Migration of Interdomain component and OECC/PSC'22 test to Release 2
...@@ -49,7 +49,7 @@ import logging, queue, uuid ...@@ -49,7 +49,7 @@ import logging, queue, uuid
from typing import Dict, List, Optional, Tuple from typing import Dict, List, Optional, Tuple
from common.DeviceTypes import DeviceTypeEnum from common.DeviceTypes import DeviceTypeEnum
from common.proto.context_pb2 import Device, ServiceTypeEnum from common.proto.context_pb2 import Device, ServiceTypeEnum
from .ResourceGroups import IGNORED_DEVICE_TYPES, get_resource_classification from .ResourceGroups import IGNORED_DEVICE_TYPES, REMOTEDOMAIN_DEVICE_TYPES, get_resource_classification
from .ServiceTypes import get_service_type from .ServiceTypes import get_service_type
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)
...@@ -81,7 +81,21 @@ def convert_explicit_path_hops_to_connections( ...@@ -81,7 +81,21 @@ def convert_explicit_path_hops_to_connections(
LOGGER.debug(' ignored') LOGGER.debug(' ignored')
continue continue
if prv_res_class[0] is None: if res_class[1] in REMOTEDOMAIN_DEVICE_TYPES:
LOGGER.debug(' create and terminate underlying connection')
# create underlying connection
connection_uuid = str(uuid.uuid4())
prv_service_type = connection_stack.queue[-1][1]
service_type = get_service_type(res_class[1], prv_service_type)
connection_stack.put((connection_uuid, service_type, [path_hop], []))
# underlying connection ended
connection = connection_stack.get()
connections.append(connection)
connection_stack.queue[-1][3].append(connection[0])
#connection_stack.queue[-1][2].append(path_hop)
elif prv_res_class[0] is None:
# path ingress # path ingress
LOGGER.debug(' path ingress') LOGGER.debug(' path ingress')
connection_stack.put((main_service_uuid, main_service_type, [path_hop], [])) connection_stack.put((main_service_uuid, main_service_type, [path_hop], []))
......
...@@ -53,6 +53,7 @@ DEVICE_TYPE_TO_DEEPNESS = { ...@@ -53,6 +53,7 @@ DEVICE_TYPE_TO_DEEPNESS = {
} }
IGNORED_DEVICE_TYPES = {DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER} IGNORED_DEVICE_TYPES = {DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER}
REMOTEDOMAIN_DEVICE_TYPES = {DeviceTypeEnum.NETWORK}
def get_device_controller_uuid( def get_device_controller_uuid(
device : Device device : Device
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment