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

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into...

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into feat/143-cttc-logical-resources-component
parents 62bf6765 041b3d0b
Loading
Loading
Loading
Loading
+89 −0
Changes for manifests/pluggablesservice.yaml: 89 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Copyright 2022-2025 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pluggablesservice
spec:
  selector:
    matchLabels:
      app: pluggablesservice
  #replicas: 1
  template:
    metadata:
      labels:
        app: pluggablesservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
        - name: server
          image: labs.etsi.org:5050/tfs/controller/pluggables:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 30220
          env:
            - name: LOG_LEVEL
              value: "INFO"
          readinessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:30220"]
          livenessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:30220"]
          resources:
            requests:
              cpu: 250m
              memory: 128Mi
            limits:
              cpu: 1000m
              memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: pluggablesservice
  labels:
    app: pluggablesservice
spec:
  type: ClusterIP
  selector:
    app: pluggablesservice
  ports:
    - name: grpc
      protocol: TCP
      port: 30220
      targetPort: 30220
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: pluggablesservice-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: pluggablesservice
  minReplicas: 1
  maxReplicas: 20
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 80
  #behavior:
  #  scaleDown:
  #    stabilizationWindowSeconds: 30
+3 −2
Changes for proto/context.proto: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -260,8 +260,9 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_GNMI_NOKIA_SRLINUX = 19;
  DEVICEDRIVER_OPENROADM = 20;
  DEVICEDRIVER_RESTCONF_OPENCONFIG = 21;
  DEVICEDRIVER_CUSTOM_IPOWDM = 22;
  DEVICEDRIVER_MIKROTIK_ROUTEROS = 23;
  DEVICEDRIVER_NETCONF_OC_PLUGGABLE = 22;
  DEVICEDRIVER_CUSTOM_IPOWDM = 23;
  DEVICEDRIVER_MIKROTIK_ROUTEROS = 24;
}

enum DeviceOperationalStatusEnum {
+8 −0
Changes for proto/kpi_sample_types.proto: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -75,4 +75,12 @@ enum KpiSampleType {

    KPISAMPLETYPE_INT_IS_DROP        = 2201;
    KPISAMPLETYPE_INT_DROP_REASON    = 2202;

    // PLUGGABLES
    KPISAMPLETYPE_PRE_FEC_BER_PLUGGABLE    = 2301;
    KPISAMPLETYPE_RECEIVED_POWER_PLUGGABLE = 2302;

    // PLUGGABLES Aggregated Output KPIs
    KPISAMPLETYPE_PRE_FEC_BER_PLUGGABLE_AGG_OUTPUT    = 3301;
    KPISAMPLETYPE_RECEIVED_POWER_PLUGGABLE_AGG_OUTPUT = 3302;
}
+59 −50
Changes for proto/pluggables.proto: 59 added lines, 50 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,48 @@ service PluggablesService {
}


message CreatePluggableRequest {
  context.DeviceId device                    = 1;
  int32            preferred_pluggable_index = 2;   // -1 for auto (physical slot number in the device(router))
  PluggableConfig  initial_config            = 3;
}

message ListPluggablesRequest {
  context.DeviceId device     = 1;
  View             view_level = 2;
}

message ListPluggablesResponse {
  repeated Pluggable pluggables = 1;
}

message GetPluggableRequest {
  PluggableId id         = 1;
  View        view_level = 2;
}

message DeletePluggableRequest {
  PluggableId id = 1;
}

message ConfigurePluggableRequest {
  PluggableConfig config                = 1;
  View            view_level            = 2;
  int32           apply_timeout_seconds = 3;   // Not Implemented yet (for timeout)
}

// to control the level of detail in responses
enum View {
  VIEW_UNSPECIFIED = 0;
  VIEW_CONFIG      = 1;
  VIEW_STATE       = 2;
  VIEW_FULL        = 3;
}

// -----------------------------------------------------------------------------
// Pluggable and Digital Subcarrier Messages
// -----------------------------------------------------------------------------

message PluggableId {
  context.DeviceId device           = 1;
  int32            pluggable_index  = 2;  // physical slot number in the device
@@ -47,8 +89,8 @@ message DigitalSubcarrierConfig {
  DigitalSubcarrierId id                      = 1;
  bool                active                  = 2;
  double              target_output_power_dbm = 3;
  double center_frequency_hz     = 10;
  double symbol_rate_baud        = 11;
  double              center_frequency_hz     = 4;
  double              symbol_rate_baud        = 5;
}

message DigitalSubcarrierState {
@@ -56,7 +98,7 @@ message DigitalSubcarrierState {
  bool                active                    = 2;
  double              measured_output_power_dbm = 3;
  double              osnr_db                   = 4;
  context.Timestamp updated_at     = 10;
  context.Timestamp   updated_at                = 5;
}

message DigitalSubcarrierGroupConfig {
@@ -64,7 +106,7 @@ message DigitalSubcarrierGroupConfig {
  int32                            group_size             = 2;   // expected number of DSCs
  double                           group_capacity_gbps    = 3;   // from YANG group capacity in Gbps
  double                           subcarrier_spacing_mhz = 4;   // from YANG digital-subcarrier-spacing
  repeated DigitalSubcarrierConfig subcarriers = 10;
  repeated DigitalSubcarrierConfig subcarriers            = 5;
}

message DigitalSubcarrierGroupState {
@@ -72,8 +114,15 @@ message DigitalSubcarrierGroupState {
  int32                           count                  = 2;   // available DSCs
  double                          group_capacity_gbps    = 3;
  double                          subcarrier_spacing_mhz = 4;
  repeated DigitalSubcarrierState subcarriers = 10;
  context.Timestamp updated_at                = 20;
  repeated DigitalSubcarrierState subcarriers            = 5;
  context.Timestamp               updated_at             = 6;
}

message PluggableChannelConfig {
  string                                channel_name            = 1;
  double                                center_frequency_mhz    = 2;
  double                                target_output_power_dbm = 3;
  repeated DigitalSubcarrierGroupConfig dsc_groups              = 4;
}

message PluggableConfig {
@@ -83,13 +132,14 @@ message PluggableConfig {
  int32                                 operational_mode        = 4;   // e.g., 0=off and 1=on 
  int32                                 line_port               = 5;   // line port number
  string                                channel_name            = 6;   // channel name
  repeated DigitalSubcarrierGroupConfig dsc_groups = 10;
  repeated DigitalSubcarrierGroupConfig dsc_groups              = 7;
  repeated PluggableChannelConfig       channel_configs         = 8;
}

message PluggableState {
  PluggableId                          id         = 1;
  repeated DigitalSubcarrierGroupState dsc_groups = 10;
  context.Timestamp updated_at                    = 20;
  repeated DigitalSubcarrierGroupState dsc_groups = 2;
  context.Timestamp                    updated_at = 3;
}

message Pluggable {
@@ -97,44 +147,3 @@ message Pluggable {
  PluggableConfig config = 2;
  PluggableState  state  = 3;
}
 No newline at end of file

// -----------------------------------------------------------------------------
// RPC I/O Messages
// -----------------------------------------------------------------------------
message CreatePluggableRequest {
  context.DeviceId device         = 1;
  int32 preferred_pluggable_index = 2;   // -1 for auto (physical slot number in the device(router))
  PluggableConfig initial_config  = 10;
}

message ListPluggablesRequest {
  context.DeviceId device = 1;
  View view_level         = 2;
}

message ListPluggablesResponse {
  repeated Pluggable pluggables = 1;
}

message GetPluggableRequest {
  PluggableId id  = 1;
  View view_level = 2;
}

message DeletePluggableRequest {
  PluggableId id = 1;
}

message ConfigurePluggableRequest {
  PluggableConfig config      = 1;
  View view_level             = 2;
  int32 apply_timeout_seconds = 10;   // Not Implemented yet (for timeout)
}

// to control the level of detail in responses
enum View {
  VIEW_UNSPECIFIED = 0;
  VIEW_CONFIG      = 1;
  VIEW_STATE       = 2;
  VIEW_FULL        = 3;
}
+1 −0
Changes for proto/policy_action.proto: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ enum PolicyRuleActionEnum {
  POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3;
  POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4;
  POLICY_RULE_ACTION_RECALCULATE_PATH = 5;
  POLICY_RULE_ACTION_GENERATE_FAILURE_NOTIFICATION = 6;
}

// Action configuration
Loading