Skip to content
Snippets Groups Projects
Commit 7a509524 authored by Carlos Manso's avatar Carlos Manso
Browse files

update

parent 84fcce79
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!225Resolve "Integrate Support for IP-E2E-Optical SDN controllers to manage hierarchical virtual topologies"
......@@ -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)
......
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