From 7a5095249be67a17c5955c714b593d3e56e2c9ac Mon Sep 17 00:00:00 2001
From: mansoca <carlos.manso@cttc.es>
Date: Wed, 22 May 2024 13:53:14 +0000
Subject: [PATCH] update

---
 .../service/E2EOrchestratorServiceServicerImpl.py        | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py
index 5911ac384..42ccb43e2 100644
--- a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py
+++ b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py
@@ -16,8 +16,8 @@ import copy
 from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method
 from common.proto.e2eorchestrator_pb2 import E2EOrchestratorRequest, E2EOrchestratorReply
 from common.proto.context_pb2 import (
-    Empty, Connection, EndPointId, Link, LinkId, TopologyDetails, Topology, Context, Service, ServiceId, ServiceTypeEnum,
-    ServiceStatusEnum)
+    Empty, Connection, EndPointId, Link, LinkId, TopologyDetails, Topology, Context, Service, ServiceId,
+    ServiceTypeEnum, ServiceStatusEnum)
 from common.proto.e2eorchestrator_pb2_grpc import E2EOrchestratorServiceServicer
 from context.client.ContextClient import ContextClient
 from service.client.ServiceClient import ServiceClient
@@ -101,6 +101,7 @@ class SubscriptionServer(Thread):
             message_json = json.loads(message)
             # LOGGER.info("message_json: {}".format(message_json))
 
+            # Link creation
             if 'link_id' in message_json:
                 link = Link(**message_json)
 
@@ -137,6 +138,7 @@ class SubscriptionServer(Thread):
 
                 # service_client.UpdateService(service)
                 connection.send(grpc_message_to_json_string(link))
+            # Link removal
             elif 'link_uuid' in message_json:
                 LOGGER.info('REMOVING VIRTUAL LINK')
                 link_id = LinkId(**message_json)
@@ -146,7 +148,8 @@ class SubscriptionServer(Thread):
                 service_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME
                 # service_client.DeleteService(service_id)
                 connection.send(grpc_message_to_json_string(link_id))
-
+                context_client.RemoveLink(link_id)
+            # Topology received
             else:
                 LOGGER.info('TOPOLOGY')
                 topology_details = TopologyDetails(**message_json)
-- 
GitLab