From a6036edaa39c77ceab6e1d635ef749b6de6202a4 Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Wed, 19 Mar 2025 11:23:07 +0000
Subject: [PATCH] E2E Orchestrator component:

- Corrected selection of border transponders
---
 .../subscriptions/dispatchers/recommendation/Tools.py      | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py
index 12b2069cf..606b5da95 100644
--- a/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py
+++ b/src/e2e_orchestrator/service/subscriptions/dispatchers/recommendation/Tools.py
@@ -130,6 +130,11 @@ def compose_optical_service(vlink_request : Dict) -> Dict:
 
     LOGGER.info('[compose_optical_service] path_hops={:s}'.format(str(path_hops)))
 
+    OPTICAL_TRANSPONDER_TYPE = {
+        DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value,
+        DeviceTypeEnum.OPTICAL_TRANSPONDER.value,
+    }
+
     optical_border_endpoint_ids : List[str] = list()
     for endpoint_uuid in path_hops:
         LOGGER.info('[compose_optical_service] endpoint_uuid={:s}'.format(str(endpoint_uuid)))
@@ -137,7 +142,7 @@ def compose_optical_service(vlink_request : Dict) -> Dict:
         LOGGER.info('[compose_optical_service]   device_uuid={:s}'.format(str(device_uuid)))
         device_type = graph_and_mapping.device_to_type[device_uuid]
         LOGGER.info('[compose_optical_service]   device_type={:s}'.format(str(device_type)))
-        if device_type != DeviceTypeEnum.EMULATED_OPTICAL_TRANSPONDER.value: continue
+        if device_type not in OPTICAL_TRANSPONDER_TYPE: continue
         device_id = json_device_id(device_uuid)
         endpoint_id = json_endpoint_id(device_id, endpoint_uuid)
         LOGGER.info('[compose_optical_service]   endpoint_id={:s}'.format(str(endpoint_id)))
-- 
GitLab