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

PathComp component - Frontend:

- Deactivated use of interdomain topology
- Tuned devicetype NETWORK to always require creation of a sub-service
parent 10b0930e
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!119Migration of Interdomain component and OECC/PSC'22 test to Release 2
...@@ -46,16 +46,18 @@ class PathCompServiceServicerImpl(PathCompServiceServicer): ...@@ -46,16 +46,18 @@ class PathCompServiceServicerImpl(PathCompServiceServicer):
context_client = ContextClient() context_client = ContextClient()
context_id = json_context_id(DEFAULT_CONTEXT_NAME) context_id = json_context_id(DEFAULT_CONTEXT_NAME)
if (len(request.services) == 1) and is_inter_domain(context_client, request.services[0].service_endpoint_ids): # TODO: improve definition of topologies; for interdomain the current topology design might be not convenient
#devices = get_devices_in_topology(context_client, ADMIN_CONTEXT_ID, INTERDOMAIN_TOPOLOGY_NAME) #if (len(request.services) == 1) and is_inter_domain(context_client, request.services[0].service_endpoint_ids):
#links = get_links_in_topology(context_client, ADMIN_CONTEXT_ID, INTERDOMAIN_TOPOLOGY_NAME) # #devices = get_devices_in_topology(context_client, ADMIN_CONTEXT_ID, INTERDOMAIN_TOPOLOGY_NAME)
topology_id = json_topology_id(INTERDOMAIN_TOPOLOGY_NAME, context_id) # #links = get_links_in_topology(context_client, ADMIN_CONTEXT_ID, INTERDOMAIN_TOPOLOGY_NAME)
else: # topology_id = json_topology_id(INTERDOMAIN_TOPOLOGY_NAME, context_id)
# TODO: improve filtering of devices and links #else:
# TODO: add contexts, topologies, and membership of devices/links in topologies # # TODO: improve filtering of devices and links
#devices = context_client.ListDevices(Empty()) # # TODO: add contexts, topologies, and membership of devices/links in topologies
#links = context_client.ListLinks(Empty()) # #devices = context_client.ListDevices(Empty())
topology_id = json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id) # #links = context_client.ListLinks(Empty())
# topology_id = json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id)
topology_id = json_topology_id(DEFAULT_TOPOLOGY_NAME, context_id)
topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id)) topology_details = context_client.GetTopologyDetails(TopologyId(**topology_id))
......
...@@ -22,7 +22,6 @@ from common.tools.grpc.Tools import grpc_message_to_json_string ...@@ -22,7 +22,6 @@ from common.tools.grpc.Tools import grpc_message_to_json_string
DEVICE_TYPE_TO_DEEPNESS = { DEVICE_TYPE_TO_DEEPNESS = {
DeviceTypeEnum.EMULATED_DATACENTER.value : 90, DeviceTypeEnum.EMULATED_DATACENTER.value : 90,
DeviceTypeEnum.DATACENTER.value : 90, DeviceTypeEnum.DATACENTER.value : 90,
DeviceTypeEnum.NETWORK.value : 90,
DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value : 80, DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value : 80,
DeviceTypeEnum.EMULATED_PACKET_ROUTER.value : 70, DeviceTypeEnum.EMULATED_PACKET_ROUTER.value : 70,
...@@ -50,6 +49,7 @@ DEVICE_TYPE_TO_DEEPNESS = { ...@@ -50,6 +49,7 @@ DEVICE_TYPE_TO_DEEPNESS = {
DeviceTypeEnum.OPTICAL_ROADM.value : 10, DeviceTypeEnum.OPTICAL_ROADM.value : 10,
DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER.value : 0, DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER.value : 0,
DeviceTypeEnum.NETWORK.value : 0, # network out of our control; always delegate
} }
IGNORED_DEVICE_TYPES = {DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER} IGNORED_DEVICE_TYPES = {DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER}
......
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
from common.DeviceTypes import DeviceTypeEnum from common.DeviceTypes import DeviceTypeEnum
from common.proto.context_pb2 import ServiceTypeEnum from common.proto.context_pb2 import ServiceTypeEnum
NETWORK_DEVICE_TYPES = {
DeviceTypeEnum.NETWORK,
}
PACKET_DEVICE_TYPES = { PACKET_DEVICE_TYPES = {
DeviceTypeEnum.TERAFLOWSDN_CONTROLLER, DeviceTypeEnum.TERAFLOWSDN_CONTROLLER,
DeviceTypeEnum.PACKET_ROUTER, DeviceTypeEnum.EMULATED_PACKET_ROUTER, DeviceTypeEnum.PACKET_ROUTER, DeviceTypeEnum.EMULATED_PACKET_ROUTER,
...@@ -45,6 +49,7 @@ def get_service_type(device_type : DeviceTypeEnum, prv_service_type : ServiceTyp ...@@ -45,6 +49,7 @@ def get_service_type(device_type : DeviceTypeEnum, prv_service_type : ServiceTyp
if device_type in PACKET_DEVICE_TYPES and prv_service_type in SERVICE_TYPE_LXNM: return prv_service_type if device_type in PACKET_DEVICE_TYPES and prv_service_type in SERVICE_TYPE_LXNM: return prv_service_type
if device_type in L2_DEVICE_TYPES: return ServiceTypeEnum.SERVICETYPE_L2NM if device_type in L2_DEVICE_TYPES: return ServiceTypeEnum.SERVICETYPE_L2NM
if device_type in OPTICAL_DEVICE_TYPES: return ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE if device_type in OPTICAL_DEVICE_TYPES: return ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE
if device_type in NETWORK_DEVICE_TYPES: return prv_service_type
str_fields = ', '.join([ str_fields = ', '.join([
'device_type={:s}'.format(str(device_type)), 'device_type={:s}'.format(str(device_type)),
......
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