Loading src/common/Constants.py +4 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ class ServiceNameEnum(Enum): COMPUTE = 'compute' CYBERSECURITY = 'cybersecurity' INTERDOMAIN = 'interdomain' L3AM = 'l3-attackmitigator' L3_AM = 'l3-attackmitigator' L3_CAD = 'l3-centralizedattackdetector' PATHCOMP = 'pathcomp' WEBUI = 'webui' Loading @@ -67,7 +68,8 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.DLT .value : 8080, ServiceNameEnum.COMPUTE .value : 9090, ServiceNameEnum.CYBERSECURITY.value : 10000, ServiceNameEnum.L3AM .value : 10002, ServiceNameEnum.L3_CAD .value : 10001, ServiceNameEnum.L3_AM .value : 10002, ServiceNameEnum.INTERDOMAIN .value : 10010, ServiceNameEnum.PATHCOMP .value : 10020, Loading src/l3_attackmitigator/client/l3_attackmitigatorClient.py +2 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, class l3_attackmitigatorClient: def __init__(self, host=None, port=None): if not host: host = get_service_host(ServiceNameEnum.L3AM) if not port: port = get_service_port_grpc(ServiceNameEnum.L3AM) if not host: host = get_service_host(ServiceNameEnum.L3_AM) if not port: port = get_service_port_grpc(ServiceNameEnum.L3_AM) self.endpoint = "{}:{}".format(host, port) LOGGER.debug("Creating channel to {}...".format(self.endpoint)) self.channel = None Loading src/l3_attackmitigator/service/test_create_service.py +3 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,9 @@ from common.proto.l3_attackmitigator_pb2_grpc import ( L3AttackmitigatorServicer, ) 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 ( ContextServiceStub Loading Loading
src/common/Constants.py +4 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,8 @@ class ServiceNameEnum(Enum): COMPUTE = 'compute' CYBERSECURITY = 'cybersecurity' INTERDOMAIN = 'interdomain' L3AM = 'l3-attackmitigator' L3_AM = 'l3-attackmitigator' L3_CAD = 'l3-centralizedattackdetector' PATHCOMP = 'pathcomp' WEBUI = 'webui' Loading @@ -67,7 +68,8 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.DLT .value : 8080, ServiceNameEnum.COMPUTE .value : 9090, ServiceNameEnum.CYBERSECURITY.value : 10000, ServiceNameEnum.L3AM .value : 10002, ServiceNameEnum.L3_CAD .value : 10001, ServiceNameEnum.L3_AM .value : 10002, ServiceNameEnum.INTERDOMAIN .value : 10010, ServiceNameEnum.PATHCOMP .value : 10020, Loading
src/l3_attackmitigator/client/l3_attackmitigatorClient.py +2 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, class l3_attackmitigatorClient: def __init__(self, host=None, port=None): if not host: host = get_service_host(ServiceNameEnum.L3AM) if not port: port = get_service_port_grpc(ServiceNameEnum.L3AM) if not host: host = get_service_host(ServiceNameEnum.L3_AM) if not port: port = get_service_port_grpc(ServiceNameEnum.L3_AM) self.endpoint = "{}:{}".format(host, port) LOGGER.debug("Creating channel to {}...".format(self.endpoint)) self.channel = None Loading
src/l3_attackmitigator/service/test_create_service.py +3 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,9 @@ from common.proto.l3_attackmitigator_pb2_grpc import ( L3AttackmitigatorServicer, ) 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 ( ContextServiceStub Loading