Commit 871ef393 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

New service to configure interfaces

parent af8ec8e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ export CRDB_PASSWORD="tfs123"
export CRDB_DEPLOY_MODE="single"

# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS=""
export CRDB_DROP_DATABASE_IF_EXISTS="YES"

# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
@@ -186,7 +186,7 @@ export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"
export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"

# Disable flag for dropping tables if they exist.
export QDB_DROP_TABLES_IF_EXIST=""
export QDB_DROP_TABLES_IF_EXIST="YES"

# Disable flag for re-deploying QuestDB from scratch.
export QDB_REDEPLOY=""
+11 −4
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import "google/protobuf/any.proto";

import "acl.proto";
import "kpi_sample_types.proto";
import "set_interface.proto";

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

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

message ConfigRule_SET_INTERFACE {
  EndPointId endpoint_id = 1;
  set_interface.SetInterfaceRuleSet rule_set = 2;
}

message ConfigRule {
  ConfigActionEnum action = 1;
  oneof config_rule {
    ConfigRule_Custom custom = 2;
    ConfigRule_ACL acl = 3;
    ConfigRule_SET_INTERFACE set_interface = 4;
  }
}

@@ -579,7 +587,6 @@ message Location {
  oneof location {
    string region = 1;
    GPS_Position gps_position = 2;
    
    string interface=3;
    string circuit_pack=4;
  }
+22 −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 set_interface;

message SetInterfaceRuleSet {
  string  ip   = 1;
  string  mask = 3;
  string  vlan = 4;
}
 No newline at end of file

quick_deploy.sh

0 → 100755
+438 −0

File added.

Preview size limit exceeded, changes collapsed.

+10 −0
Original line number Diff line number Diff line
@@ -64,6 +64,16 @@ def json_service_l2nm_planned(
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)

def json_service_set_interface_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_SET_INTERFACE, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)

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