Commit 5ddc1c46 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

Add IPOWDM and TAPI LSP service handlers and related configuration rules

- Introduced IpowdmServiceHandler and Tapi_LSPServiceHandler to manage IPOWDM and TAPI LSP services respectively.
- Implemented setup and teardown configuration rules for both service types.
- Enhanced the existing algorithm to handle new service types and their configurations.
- Updated ServiceTypes to include IPOWDM and TAPI LSP.
- Added necessary imports and utility functions for handling new service configurations.
- Modified existing service handler APIs to accommodate new service types.
- Ensured logging and error handling are in place for better traceability.
parent c0eb5377
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -19,7 +19,9 @@ package context;
import "google/protobuf/any.proto";

import "acl.proto";
import "ipowdm.proto";
import "kpi_sample_types.proto";
import "tapi_lsp.proto";

service ContextService {
  rpc ListContextIds     (Empty         ) returns (       ContextIdList   ) {}
@@ -331,6 +333,8 @@ enum ServiceTypeEnum {
  SERVICETYPE_L1NM = 8;
  SERVICETYPE_INT = 9;
  SERVICETYPE_ACL = 10;
  SERVICETYPE_TAPI_LSP = 11;
  SERVICETYPE_IPOWDM = 12;
}

enum ServiceStatusEnum {
@@ -544,11 +548,23 @@ message ConfigRule_ACL {
  acl.AclRuleSet rule_set = 2;
}

message ConfigRule_IPOWDM {
  EndPointId endpoint_id        = 1;
  ipowdm.IpowdmRuleSet rule_set = 2;
}

message ConfigRule_TAPI_LSP {
  EndPointId endpoint_id           = 1;
  tapi_lsp.TapiLspRuleSet rule_set = 2;
}

message ConfigRule {
  ConfigActionEnum action = 1;
  oneof config_rule {
    ConfigRule_Custom custom = 2;
    ConfigRule_ACL acl = 3;
    ConfigRule_TAPI_LSP tapi_lsp = 4;
    ConfigRule_IPOWDM ipowdm = 5;
  }
}

proto/ipowdm.proto

0 → 100644
+24 −0
Original line number Diff line number Diff line
// Copyright 2022-2025 ETSI OSG/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.

syntax = "proto3";
package ipowdm;

message IpowdmRuleSet {
  string  src  = 1;
  string  dst  = 2;
  string  uuid = 3;
  string  bw   = 4;
  string  unit = 5;
}
 No newline at end of file

proto/tapi_lsp.proto

0 → 100644
+28 −0
Original line number Diff line number Diff line
// Copyright 2022-2025 ETSI OSG/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.

syntax = "proto3";
package tapi_lsp;

message TapiLspRuleSet {
  string  src  = 1;
  string  dst  = 2;
  string  uuid = 3;
  string  bw   = 4;
  string  direction = 5;
  string  layer_protocol_name = 6;
  string  layer_protocol_qualifier = 7;
  string  lower_frequency_mhz = 8;
  string  upper_frequency_mhz = 9;
}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ class DeviceTypeEnum(Enum):
    OPEN_ROADM                      = 'openroadm'
    MORPHEUS                        = 'morpheus'
    OPENFLOW_RYU_CONTROLLER         = 'openflow-ryu-controller'
    IPOWDM_ROUTER                   = 'ipowdm-router'

    # ETSI TeraFlowSDN controller
    TERAFLOWSDN_CONTROLLER          = 'teraflowsdn'
+21 −1
Original line number Diff line number Diff line
@@ -93,3 +93,23 @@ def json_service_p4_planned(
        service_uuid, ServiceTypeEnum.SERVICETYPE_L1NM, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)

def json_service_ipowdm_planned(
        service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [],
        config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME
    ):

    return json_service(
        service_uuid, ServiceTypeEnum.SERVICETYPE_IPOWDM, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)

def json_service_tapi_lsp_planned(
        service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [],
        config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME
    ):

    return json_service(
        service_uuid, ServiceTypeEnum.SERVICETYPE_TAPI_LSP, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)
Loading