Service RecomputeConnections RPC method, Device Controller node pointer and Exclude Constraint

Protos:

  • Context.proto: Added Controller field to Device entity
  • Context.proto: Added ServiceStatus UPDATING
  • Context.proto: Added Constraint Exclusions
  • Service.proto: Added RecomputeConnections RPC method

Common requirements:

  • Fixed grpclib package version

Common - Type Checkers - Assertions:

  • Added ServiceStatus UPDATING
  • Added ServiceStatus SLA_VIOLATED

Context component:

  • Added ServiceStatus UPDATING and SLA_VIOLATED
  • Added Constraint Exclusions
  • Added Controller field to Device entity

Device component:

  • Auto-enable devices when Automation component is not deployed
  • Updated get/set device controller node

PathComp component - FrontEnd:

  • Corrected deepness level of MicroWave devices/controllers
  • Updated get device controller node
  • Updated K-ShortestPath algorithm with k-inspection and k-return variables.
  • Corrected get_reply logic in _Algorithm to support retrieval of multiple connections when KSP algorithm is requested

Policy component:

  • Added ServiceStatus UPDATING
  • Added ServiceStatus SLA_VIOLATED

Service component:

  • Added RecomputeConnections RPC method to client
  • Implemented RecomputeConnections RPC method in servicer
  • Updated get device controller node in TaskExecutor
  • Corrected issue formatting error message in TaskExecutor
  • Added method compose_service_connection_update in TaskExecutor
  • Implemented test case for RecomputeConnections RPC method

WebUI component:

  • Added Controller field to Device details page
Edited by Lluis Gifre Renom

Merge request reports

Loading
+12 −2
Changes for proto/context.proto: 12 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ message Device {
  repeated DeviceDriverEnum device_drivers = 6;
  repeated EndPoint device_endpoints = 7;
  repeated Component component = 8; // Used for inventory
  DeviceId controller_id = 9; // Identifier of node controlling the actual device
}

message Component {
@@ -277,8 +278,9 @@ enum ServiceStatusEnum {
  SERVICESTATUS_UNDEFINED = 0;
  SERVICESTATUS_PLANNED = 1;
  SERVICESTATUS_ACTIVE = 2;
  SERVICESTATUS_PENDING_REMOVAL = 3;
  SERVICESTATUS_SLA_VIOLATED = 4;
  SERVICESTATUS_UPDATING = 3;
  SERVICESTATUS_PENDING_REMOVAL = 4;
  SERVICESTATUS_SLA_VIOLATED = 5;
}

message ServiceStatus {
@@ -554,6 +556,13 @@ message Constraint_SLA_Isolation_level {
  repeated IsolationLevelEnum isolation_level = 1;
}

message Constraint_Exclusions {
  bool is_permanent = 1;
  repeated DeviceId device_ids = 2;
  repeated EndPointId endpoint_ids = 3;
  repeated LinkId link_ids = 4;
}

message Constraint {
  oneof constraint {
    Constraint_Custom custom = 1;
@@ -564,6 +573,7 @@ message Constraint {
    Constraint_SLA_Latency sla_latency = 6;
    Constraint_SLA_Availability sla_availability = 7;
    Constraint_SLA_Isolation_level sla_isolation = 8;
    Constraint_Exclusions exclusions = 9;
  }
}

+1 −0
Changes for proto/service.proto: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -21,4 +21,5 @@ service ServiceService {
  rpc CreateService       (context.Service  ) returns (context.ServiceId) {}
  rpc UpdateService       (context.Service  ) returns (context.ServiceId) {}
  rpc DeleteService       (context.ServiceId) returns (context.Empty    ) {}
  rpc RecomputeConnections(context.Service  ) returns (context.Empty    ) {}
}
+2 −0
Changes for src/common/type_checkers/Assertions.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -69,7 +69,9 @@ def validate_service_state_enum(message):
        'SERVICESTATUS_UNDEFINED',
        'SERVICESTATUS_PLANNED',
        'SERVICESTATUS_ACTIVE',
        'SERVICESTATUS_UPDATING',
        'SERVICESTATUS_PENDING_REMOVAL',
        'SERVICESTATUS_SLA_VIOLATED',
    ]


+2 −0
Changes for src/context/service/database/models/enums/ServiceStatus.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -20,7 +20,9 @@ class ORM_ServiceStatusEnum(enum.Enum):
    UNDEFINED       = ServiceStatusEnum.SERVICESTATUS_UNDEFINED
    PLANNED         = ServiceStatusEnum.SERVICESTATUS_PLANNED
    ACTIVE          = ServiceStatusEnum.SERVICESTATUS_ACTIVE
    UPDATING        = ServiceStatusEnum.SERVICESTATUS_UPDATING
    PENDING_REMOVAL = ServiceStatusEnum.SERVICESTATUS_PENDING_REMOVAL
    SLA_VIOLATED    = ServiceStatusEnum.SERVICESTATUS_SLA_VIOLATED

grpc_to_enum__service_status = functools.partial(
    grpc_to_enum, ServiceStatusEnum, ORM_ServiceStatusEnum)
+1 −0
Changes for src/context/service/database/models/ConstraintModel.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ class ConstraintKindEnum(enum.Enum):
    SLA_LATENCY       = 'sla_latency'
    SLA_AVAILABILITY  = 'sla_availability'
    SLA_ISOLATION     = 'sla_isolation'
    EXCLUSIONS        = 'exclusions'

class ServiceConstraintModel(_Base):
    __tablename__ = 'service_constraint'
Loading
Loading