Commit bcdf5225 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/service-recompute-path-rpc' into 'develop'

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

See merge request !107
parents 8823ad76 eaaccf13
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ coverage==6.3
grpcio==1.47.*
grpcio-health-checking==1.47.*
grpcio-tools==1.47.*
grpclib[protobuf]
grpclib==0.4.4
prettytable==3.5.0
prometheus-client==0.13.0
protobuf==3.20.*
+13 −3
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;
  }
}

+4 −3
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
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',
    ]


+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ def compose_constraints_data(
            constraint_name = '{:s}:{:s}:{:s}'.format(parent_kind, kind.value, endpoint_uuid)
        elif kind in {
            ConstraintKindEnum.SCHEDULE, ConstraintKindEnum.SLA_CAPACITY, ConstraintKindEnum.SLA_LATENCY,
            ConstraintKindEnum.SLA_AVAILABILITY, ConstraintKindEnum.SLA_ISOLATION
            ConstraintKindEnum.SLA_AVAILABILITY, ConstraintKindEnum.SLA_ISOLATION, ConstraintKindEnum.EXCLUSIONS
        }:
            constraint_name = '{:s}:{:s}:'.format(parent_kind, kind.value)
        else:
Loading