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

Pre-merge code cleanup

parent f15ff137
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!93Updated L3 components + scalability
...@@ -47,7 +47,8 @@ class ServiceNameEnum(Enum): ...@@ -47,7 +47,8 @@ class ServiceNameEnum(Enum):
COMPUTE = 'compute' COMPUTE = 'compute'
CYBERSECURITY = 'cybersecurity' CYBERSECURITY = 'cybersecurity'
INTERDOMAIN = 'interdomain' INTERDOMAIN = 'interdomain'
L3AM = 'l3-attackmitigator' L3_AM = 'l3-attackmitigator'
L3_CAD = 'l3-centralizedattackdetector'
PATHCOMP = 'pathcomp' PATHCOMP = 'pathcomp'
WEBUI = 'webui' WEBUI = 'webui'
...@@ -67,7 +68,8 @@ DEFAULT_SERVICE_GRPC_PORTS = { ...@@ -67,7 +68,8 @@ DEFAULT_SERVICE_GRPC_PORTS = {
ServiceNameEnum.DLT .value : 8080, ServiceNameEnum.DLT .value : 8080,
ServiceNameEnum.COMPUTE .value : 9090, ServiceNameEnum.COMPUTE .value : 9090,
ServiceNameEnum.CYBERSECURITY.value : 10000, ServiceNameEnum.CYBERSECURITY.value : 10000,
ServiceNameEnum.L3AM .value : 10002, ServiceNameEnum.L3_CAD .value : 10001,
ServiceNameEnum.L3_AM .value : 10002,
ServiceNameEnum.INTERDOMAIN .value : 10010, ServiceNameEnum.INTERDOMAIN .value : 10010,
ServiceNameEnum.PATHCOMP .value : 10020, ServiceNameEnum.PATHCOMP .value : 10020,
......
...@@ -34,8 +34,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, ...@@ -34,8 +34,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION,
class l3_attackmitigatorClient: class l3_attackmitigatorClient:
def __init__(self, host=None, port=None): def __init__(self, host=None, port=None):
if not host: host = get_service_host(ServiceNameEnum.L3AM) if not host: host = get_service_host(ServiceNameEnum.L3_AM)
if not port: port = get_service_port_grpc(ServiceNameEnum.L3AM) if not port: port = get_service_port_grpc(ServiceNameEnum.L3_AM)
self.endpoint = "{}:{}".format(host, port) self.endpoint = "{}:{}".format(host, port)
LOGGER.debug("Creating channel to {}...".format(self.endpoint)) LOGGER.debug("Creating channel to {}...".format(self.endpoint))
self.channel = None self.channel = None
......
...@@ -21,7 +21,9 @@ from common.proto.l3_attackmitigator_pb2_grpc import ( ...@@ -21,7 +21,9 @@ from common.proto.l3_attackmitigator_pb2_grpc import (
L3AttackmitigatorServicer, L3AttackmitigatorServicer,
) )
from common.proto.context_pb2 import ( from common.proto.context_pb2 import (
Service, ServiceId, ServiceConfig, ServiceTypeEnum, ServiceStatusEnum, ServiceStatus, Context, ContextId, Uuid, Timestamp, ConfigRule, ConfigRule_Custom, ConfigActionEnum, Device, DeviceId, DeviceConfig, DeviceOperationalStatusEnum, DeviceDriverEnum, EndPoint, Link, LinkId, EndPoint, EndPointId, Topology, TopologyId Service, ServiceId, ServiceConfig, ServiceTypeEnum, ServiceStatusEnum, ServiceStatus, Context, ContextId, Uuid,
Timestamp, ConfigRule, ConfigRule_Custom, ConfigActionEnum, Device, DeviceId, DeviceConfig,
DeviceOperationalStatusEnum, DeviceDriverEnum, EndPoint, Link, LinkId, EndPoint, EndPointId, Topology, TopologyId
) )
from common.proto.context_pb2_grpc import ( from common.proto.context_pb2_grpc import (
ContextServiceStub ContextServiceStub
......
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