Commit 4aae26be authored by Pablo Armingol's avatar Pablo Armingol
Browse files

implementation of IPLINK service

parent f3ccc525
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"

# Set the list of components, separated by spaces, you want to build images for, and deploy.
export TFS_COMPONENTS="alto context device pathcomp service slice nbi webui load_generator"
export TFS_COMPONENTS=" context device pathcomp service slice nbi webui load_generator"

# Uncomment to activate Monitoring
#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
+5 −4
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ syntax = "proto3";
package context;

import "acl.proto";
import "ip_link.proto";
import "kpi_sample_types.proto";

service ContextService {
@@ -513,9 +514,9 @@ message ConfigRule_ACL {
  acl.AclRuleSet rule_set = 2;
}

message ConfigRule_IP_LIK {
message ConfigRule_IP_LINK {
  EndPointId endpoint_id           = 1;
  string  subnet_ip = 2;
  ip_link.IpLinkRuleSet rule_set = 2;
}

message ConfigRule {
@@ -523,7 +524,7 @@ message ConfigRule {
  oneof config_rule {
    ConfigRule_Custom custom  = 2;
    ConfigRule_ACL acl        = 3;
    ConfigRule_IP_LIK ip_link = 4;
    ConfigRule_IP_LINK ip_link = 4;
  }
}

proto/ip_link.proto

0 → 100644
+24 −0
Original line number Diff line number Diff line
// Copyright 2022-2024 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 ip_link;



message IpLinkRuleSet {
  string  ip   = 1;
  string  mask = 3;
  string  vlan = 4;
}
+10 −0
Original line number Diff line number Diff line
@@ -81,3 +81,13 @@ def json_service_p4_planned(
        service_uuid, ServiceTypeEnum.SERVICETYPE_L2NM, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)
    
def json_service_iplink_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_IPLINK, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ def validate_uuid(message, allow_empty=False):
CONFIG_RULE_TYPES = {
    'custom',
    'acl',
    'ip_link'
}
def validate_config_rule(message):
    assert isinstance(message, dict)
Loading