From 08533d97d5d59cc97765777fce9d85dc3b59b5cd Mon Sep 17 00:00:00 2001 From: "Georgios P. Katsikas" <gkatsikas@ubitech.eu> Date: Thu, 8 May 2025 12:25:17 +0300 Subject: [PATCH] fix: service types order in proto --- proto/context.proto | 12 ++++++------ src/common/tools/object_factory/Service.py | 2 +- .../p4-fwd-l1/tests/topologies/6switchObjects.py | 14 ++------------ 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/proto/context.proto b/proto/context.proto index 0f2c8011f..525997847 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -321,12 +321,12 @@ enum ServiceTypeEnum { SERVICETYPE_UNKNOWN = 0; SERVICETYPE_L3NM = 1; SERVICETYPE_L2NM = 2; - SERVICETYPE_L1NM = 3; - SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 4; - SERVICETYPE_TE = 5; - SERVICETYPE_E2E = 6; - SERVICETYPE_OPTICAL_CONNECTIVITY = 7; - SERVICETYPE_QKD = 8; + SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; + SERVICETYPE_TE = 4; + SERVICETYPE_E2E = 5; + SERVICETYPE_OPTICAL_CONNECTIVITY = 6; + SERVICETYPE_QKD = 7; + SERVICETYPE_L1NM = 8; SERVICETYPE_INT = 9; SERVICETYPE_ACL = 10; } diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index 74c183230..0d039ac35 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -90,6 +90,6 @@ def json_service_p4_planned( ): return json_service( - service_uuid, ServiceTypeEnum.SERVICETYPE_L2NM, context_id=json_context_id(context_uuid), + service_uuid, ServiceTypeEnum.SERVICETYPE_L1NM, context_id=json_context_id(context_uuid), status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) \ No newline at end of file diff --git a/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py b/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py index 522066bb0..69a68a569 100644 --- a/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py +++ b/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py @@ -312,12 +312,6 @@ LINK_SW5_SW6 = json_link(LINK_SW5_SW6_UUID, [ENDPOINT_ID_SW5_2, E # ----- Service ---------------------------------------------------------------------------------------------------------- -#SERVICE_SW1_UUID = get_service_uuid(ENDPOINT_ID_SW1_1, ENDPOINT_ID_SW1_2) -#SERVICE_SW1 = json_service_p4_planned(SERVICE_SW1_UUID) - -#SERVICE_SW2_UUID = get_service_uuid(ENDPOINT_ID_SW2_1, ENDPOINT_ID_SW2_2) -#SERVICE_SW2 = json_service_p4_planned(SERVICE_SW2_UUID) - SERVICE_SW1_SW6_UUID = get_service_uuid(ENDPOINT_ID_SW1_3, ENDPOINT_ID_SW6_3) SERVICE_SW1_SW6 = json_service_p4_planned(SERVICE_SW1_SW6_UUID) SERVICE_SW1_SW6_ENDPOINT_IDS = [DEVICE_SW1_ENDPOINT_IDS[2], DEVICE_SW6_ENDPOINT_IDS[2]] @@ -345,10 +339,6 @@ LINKS = [ LINK_SW4_SW6, LINK_SW5_SW6 - ] - -#SERVICES = [(SERVICE_SW1, DEVICE_SW1_ENDPOINT_IDS), (SERVICE_SW2, DEVICE_SW2_ENDPOINT_IDS)] - -#SERVICE_SW1_SW2_ENDPOINT_IDS = DEVICE_SW1_ENDPOINT_IDS + DEVICE_SW2_ENDPOINT_IDS + ] -SERVICES = [(SERVICE_SW1_SW6, SERVICE_SW1_SW6_ENDPOINT_IDS)] \ No newline at end of file +SERVICES = [(SERVICE_SW1_SW6, SERVICE_SW1_SW6_ENDPOINT_IDS)] -- GitLab