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

File structure:

- corrected overwritten symbolic links
parent 07844f04
Loading
Loading
Loading
Loading
+0 −69
Original line number Diff line number Diff line
// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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 acl;

enum AclRuleTypeEnum {
  ACLRULETYPE_UNDEFINED = 0;
  ACLRULETYPE_IPV4      = 1;
  ACLRULETYPE_IPV6      = 2;
  ACLRULETYPE_L2        = 3;
  ACLRULETYPE_MPLS      = 4;
  ACLRULETYPE_MIXED     = 5;
}

enum AclForwardActionEnum {
  ACLFORWARDINGACTION_UNDEFINED = 0;
  ACLFORWARDINGACTION_DROP      = 1;
  ACLFORWARDINGACTION_ACCEPT    = 2;
  ACLFORWARDINGACTION_REJECT    = 3;
}

enum AclLogActionEnum {
  ACLLOGACTION_UNDEFINED = 0;
  ACLLOGACTION_NOLOG     = 1;
  ACLLOGACTION_SYSLOG    = 2;
}

message AclMatch {
  uint32 dscp             = 1;
  uint32 protocol         = 2;
  string src_address      = 3;
  string dst_address      = 4;
  uint32 src_port         = 5;
  uint32 dst_port         = 6;
  uint32 start_mpls_label = 7;
  uint32 end_mpls_label   = 8;
}

message AclAction {
  AclForwardActionEnum forward_action = 1;
  AclLogActionEnum     log_action     = 2;
}

message AclEntry {
  uint32    sequence_id = 1;
  string    description = 2;
  AclMatch  match       = 3;
  AclAction action      = 4;
}

message AclRuleSet {
  string             name        = 1;
  AclRuleTypeEnum    type        = 2;
  string             description = 3;
  string             user_id     = 4;
  repeated AclEntry  entries     = 5;
}
+0 −69
Original line number Diff line number Diff line
// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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 automation;

import "context.proto";

service AutomationService {
  rpc ZtpGetDeviceRole(DeviceRoleId) returns (DeviceRole) {}
  rpc ZtpGetDeviceRolesByDeviceId(context.DeviceId) returns (DeviceRoleList) {}
  rpc ZtpAdd(DeviceRole) returns (DeviceRoleState) {}
  rpc ZtpUpdate(DeviceRoleConfig) returns (DeviceRoleState) {}
  rpc ZtpDelete(DeviceRole) returns (DeviceRoleState) {}
  rpc ZtpDeleteAll(context.Empty) returns (DeviceDeletionResult) {}
}

enum DeviceRoleType {
  NONE = 0;
  DEV_OPS = 1;
  DEV_CONF = 2;
  PIPELINE_CONF = 3;
}

message DeviceRoleId {
  context.Uuid devRoleId = 1;
  context.DeviceId devId = 2;
}

message DeviceRole {
  DeviceRoleId devRoleId = 1;
  DeviceRoleType devRoleType = 2;
}

message DeviceRoleConfig {
  DeviceRole devRole = 1;
  context.DeviceConfig devConfig = 2;
}

message DeviceRoleList {
  repeated DeviceRole devRole = 1;
}

message DeviceRoleState {
  DeviceRoleId devRoleId = 1;
  ZtpDeviceState devRoleState = 2;
}

message DeviceDeletionResult {
  repeated string deleted = 1;
}

enum ZtpDeviceState {
  ZTP_DEV_STATE_UNDEFINED = 0;
  ZTP_DEV_STATE_CREATED  = 1;
  ZTP_DEV_STATE_UPDATED  = 2;
  ZTP_DEV_STATE_DELETED  = 3;
}
+0 −554
Original line number Diff line number Diff line
// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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 context;

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

service ContextService {
  rpc ListContextIds     (Empty         ) returns (       ContextIdList   ) {}
  rpc ListContexts       (Empty         ) returns (       ContextList     ) {}
  rpc GetContext         (ContextId     ) returns (       Context         ) {}
  rpc SetContext         (Context       ) returns (       ContextId       ) {}
  rpc RemoveContext      (ContextId     ) returns (       Empty           ) {}
  rpc GetContextEvents   (Empty         ) returns (stream ContextEvent    ) {}

  rpc ListTopologyIds    (ContextId     ) returns (       TopologyIdList  ) {}
  rpc ListTopologies     (ContextId     ) returns (       TopologyList    ) {}
  rpc GetTopology        (TopologyId    ) returns (       Topology        ) {}
  rpc GetTopologyDetails (TopologyId    ) returns (       TopologyDetails ) {}
  rpc SetTopology        (Topology      ) returns (       TopologyId      ) {}
  rpc RemoveTopology     (TopologyId    ) returns (       Empty           ) {}
  rpc GetTopologyEvents  (Empty         ) returns (stream TopologyEvent   ) {}

  rpc ListDeviceIds      (Empty         ) returns (       DeviceIdList    ) {}
  rpc ListDevices        (Empty         ) returns (       DeviceList      ) {}
  rpc GetDevice          (DeviceId      ) returns (       Device          ) {}
  rpc SetDevice          (Device        ) returns (       DeviceId        ) {}
  rpc RemoveDevice       (DeviceId      ) returns (       Empty           ) {}
  rpc GetDeviceEvents    (Empty         ) returns (stream DeviceEvent     ) {}

  rpc ListEndPointNames  (EndPointIdList) returns (       EndPointNameList) {}

  rpc ListLinkIds        (Empty         ) returns (       LinkIdList      ) {}
  rpc ListLinks          (Empty         ) returns (       LinkList        ) {}
  rpc GetLink            (LinkId        ) returns (       Link            ) {}
  rpc SetLink            (Link          ) returns (       LinkId          ) {}
  rpc RemoveLink         (LinkId        ) returns (       Empty           ) {}
  rpc GetLinkEvents      (Empty         ) returns (stream LinkEvent       ) {}

  rpc ListServiceIds     (ContextId     ) returns (       ServiceIdList   ) {}
  rpc ListServices       (ContextId     ) returns (       ServiceList     ) {}
  rpc GetService         (ServiceId     ) returns (       Service         ) {}
  rpc SetService         (Service       ) returns (       ServiceId       ) {}
  rpc UnsetService       (Service       ) returns (       ServiceId       ) {}
  rpc RemoveService      (ServiceId     ) returns (       Empty           ) {}
  rpc GetServiceEvents   (Empty         ) returns (stream ServiceEvent    ) {}

  rpc ListSliceIds       (ContextId     ) returns (       SliceIdList     ) {}
  rpc ListSlices         (ContextId     ) returns (       SliceList       ) {}
  rpc GetSlice           (SliceId       ) returns (       Slice           ) {}
  rpc SetSlice           (Slice         ) returns (       SliceId         ) {}
  rpc UnsetSlice         (Slice         ) returns (       SliceId         ) {}
  rpc RemoveSlice        (SliceId       ) returns (       Empty           ) {}
  rpc GetSliceEvents     (Empty         ) returns (stream SliceEvent      ) {}

  rpc ListConnectionIds  (ServiceId     ) returns (       ConnectionIdList) {}
  rpc ListConnections    (ServiceId     ) returns (       ConnectionList  ) {}
  rpc GetConnection      (ConnectionId  ) returns (       Connection      ) {}
  rpc SetConnection      (Connection    ) returns (       ConnectionId    ) {}
  rpc RemoveConnection   (ConnectionId  ) returns (       Empty           ) {}
  rpc GetConnectionEvents(Empty         ) returns (stream ConnectionEvent ) {}
}

// ----- Generic -------------------------------------------------------------------------------------------------------
message Empty {}

message Uuid {
  string uuid = 1;
}

enum EventTypeEnum {
  EVENTTYPE_UNDEFINED = 0;
  EVENTTYPE_CREATE = 1;
  EVENTTYPE_UPDATE = 2;
  EVENTTYPE_REMOVE = 3;
}

message Timestamp {
  double timestamp = 1;
}

message Event {
  Timestamp timestamp = 1;
  EventTypeEnum event_type = 2;
}

// ----- Context -------------------------------------------------------------------------------------------------------
message ContextId {
  Uuid context_uuid = 1;
}

message Context {
  ContextId context_id = 1;
  string name = 2;
  repeated TopologyId topology_ids = 3;
  repeated ServiceId service_ids = 4;
  repeated SliceId slice_ids = 5;
  TeraFlowController controller = 6;
}

message ContextIdList {
  repeated ContextId context_ids = 1;
}

message ContextList {
  repeated Context contexts = 1;
}

message ContextEvent {
  Event event = 1;
  ContextId context_id = 2;
}


// ----- Topology ------------------------------------------------------------------------------------------------------
message TopologyId {
  ContextId context_id = 1;
  Uuid topology_uuid = 2;
}

message Topology {
  TopologyId topology_id = 1;
  string name = 2;
  repeated DeviceId device_ids = 3;
  repeated LinkId link_ids = 4;
}

message TopologyDetails {
  TopologyId topology_id = 1;
  string name = 2;
  repeated Device devices = 3;
  repeated Link links = 4;
}

message TopologyIdList {
  repeated TopologyId topology_ids = 1;
}

message TopologyList {
  repeated Topology topologies = 1;
}

message TopologyEvent {
  Event event = 1;
  TopologyId topology_id = 2;
}


// ----- Device --------------------------------------------------------------------------------------------------------
message DeviceId {
  Uuid device_uuid = 1;
}

message Device {
  DeviceId device_id = 1;
  string name = 2;
  string device_type = 3;
  DeviceConfig device_config = 4;
  DeviceOperationalStatusEnum device_operational_status = 5;
  repeated DeviceDriverEnum device_drivers = 6;
  repeated EndPoint device_endpoints = 7;
  repeated Component component = 8; // Used for inventory
}

message Component {
  repeated string comp_string = 1;
}

message DeviceConfig {
  repeated ConfigRule config_rules = 1;
}

enum DeviceDriverEnum {
  DEVICEDRIVER_UNDEFINED = 0; // also used for emulated
  DEVICEDRIVER_OPENCONFIG = 1;
  DEVICEDRIVER_TRANSPORT_API = 2;
  DEVICEDRIVER_P4 = 3;
  DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4;
  DEVICEDRIVER_ONF_TR_352 = 5;
  DEVICEDRIVER_XR = 6;
}

enum DeviceOperationalStatusEnum {
  DEVICEOPERATIONALSTATUS_UNDEFINED = 0;
  DEVICEOPERATIONALSTATUS_DISABLED = 1;
  DEVICEOPERATIONALSTATUS_ENABLED = 2;
}

message DeviceIdList {
  repeated DeviceId device_ids = 1;
}

message DeviceList {
  repeated Device devices = 1;
}

message DeviceEvent {
  Event event = 1;
  DeviceId device_id = 2;
  DeviceConfig device_config = 3;
}


// ----- Link ----------------------------------------------------------------------------------------------------------
message LinkId {
  Uuid link_uuid = 1;
}

message Link {
  LinkId link_id = 1;
  string name = 2;
  repeated EndPointId link_endpoint_ids = 3;
}

message LinkIdList {
  repeated LinkId link_ids = 1;
}

message LinkList {
  repeated Link links = 1;
}

message LinkEvent {
  Event event = 1;
  LinkId link_id = 2;
}


// ----- Service -------------------------------------------------------------------------------------------------------
message ServiceId {
  ContextId context_id = 1;
  Uuid service_uuid = 2;
}

message Service {
  ServiceId service_id = 1;
  string name = 2;
  ServiceTypeEnum service_type = 3;
  repeated EndPointId service_endpoint_ids = 4;
  repeated Constraint service_constraints = 5;
  ServiceStatus service_status = 6;
  ServiceConfig service_config = 7;
  Timestamp timestamp = 8;
}

enum ServiceTypeEnum {
  SERVICETYPE_UNKNOWN = 0;
  SERVICETYPE_L3NM = 1;
  SERVICETYPE_L2NM = 2;
  SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3;
}

enum ServiceStatusEnum {
  SERVICESTATUS_UNDEFINED = 0;
  SERVICESTATUS_PLANNED = 1;
  SERVICESTATUS_ACTIVE =  2;
  SERVICESTATUS_PENDING_REMOVAL = 3;
  SERVICESTATUS_SLA_VIOLATED = 4;
}

message ServiceStatus {
  ServiceStatusEnum service_status = 1;
}

message ServiceConfig {
  repeated ConfigRule config_rules = 1;
}

message ServiceIdList {
  repeated ServiceId service_ids = 1;
}

message ServiceList {
  repeated Service services = 1;
}

message ServiceEvent {
  Event event = 1;
  ServiceId service_id = 2;
}

// ----- Slice ---------------------------------------------------------------------------------------------------------
message SliceId {
  ContextId context_id = 1;
  Uuid slice_uuid = 2;
}

message Slice {
  SliceId slice_id = 1;
  string name = 2;
  repeated EndPointId slice_endpoint_ids = 3;
  repeated Constraint slice_constraints = 4;
  repeated ServiceId slice_service_ids = 5;
  repeated SliceId slice_subslice_ids = 6;
  SliceStatus slice_status = 7;
  SliceConfig slice_config = 8;
  SliceOwner slice_owner = 9;
  Timestamp timestamp = 10;
}

message SliceOwner {
  Uuid owner_uuid = 1;
  string owner_string = 2;
}

enum SliceStatusEnum {
  SLICESTATUS_UNDEFINED    = 0;
  SLICESTATUS_PLANNED      = 1;
  SLICESTATUS_INIT         = 2;
  SLICESTATUS_ACTIVE       = 3;
  SLICESTATUS_DEINIT       = 4;
  SLICESTATUS_SLA_VIOLATED = 5;
}

message SliceStatus {
  SliceStatusEnum slice_status = 1;
}

message SliceConfig {
  repeated ConfigRule config_rules = 1;
}

message SliceIdList {
  repeated SliceId slice_ids = 1;
}

message SliceList {
  repeated Slice slices = 1;
}

message SliceEvent {
  Event event = 1;
  SliceId slice_id = 2;
}

// ----- Connection ----------------------------------------------------------------------------------------------------
message ConnectionId {
  Uuid connection_uuid = 1;
}

message ConnectionSettings_L0 {
  string lsp_symbolic_name = 1;
}

message ConnectionSettings_L2 {
  string src_mac_address = 1;
  string dst_mac_address = 2;
  uint32 ether_type = 3;
  uint32 vlan_id = 4;
  uint32 mpls_label = 5;
  uint32 mpls_traffic_class = 6;
}

message ConnectionSettings_L3 {
  string src_ip_address = 1;
  string dst_ip_address = 2;
  uint32 dscp = 3;
  uint32 protocol = 4;
  uint32 ttl = 5;
}

message ConnectionSettings_L4 {
  uint32 src_port = 1;
  uint32 dst_port = 2;
  uint32 tcp_flags = 3;
  uint32 ttl = 4;
}

message ConnectionSettings {
  ConnectionSettings_L0 l0 = 1;
  ConnectionSettings_L2 l2 = 2;
  ConnectionSettings_L3 l3 = 3;
  ConnectionSettings_L4 l4 = 4;
}

message Connection {
  ConnectionId connection_id = 1;
  ServiceId service_id = 2;
  repeated EndPointId path_hops_endpoint_ids = 3;
  repeated ServiceId sub_service_ids = 4;
  ConnectionSettings settings = 5;
}

message ConnectionIdList {
  repeated ConnectionId connection_ids = 1;
}

message ConnectionList {
  repeated Connection connections = 1;
}

message ConnectionEvent {
  Event event = 1;
  ConnectionId connection_id = 2;
}


// ----- Endpoint ------------------------------------------------------------------------------------------------------
message EndPointId {
  TopologyId topology_id = 1;
  DeviceId device_id = 2;
  Uuid endpoint_uuid = 3;
}

message EndPoint {
  EndPointId endpoint_id = 1;
  string name = 2;
  string endpoint_type = 3;
  repeated kpi_sample_types.KpiSampleType kpi_sample_types = 4;
  Location endpoint_location = 5;
}

message EndPointName {
  EndPointId endpoint_id = 1;
  string device_name = 2;
  string endpoint_name = 3;
  string endpoint_type = 4;
}

message EndPointIdList {
  repeated EndPointId endpoint_ids = 1;
}

message EndPointNameList {
  repeated EndPointName endpoint_names = 1;
}


// ----- Configuration -------------------------------------------------------------------------------------------------
enum ConfigActionEnum {
  CONFIGACTION_UNDEFINED = 0;
  CONFIGACTION_SET       = 1;
  CONFIGACTION_DELETE    = 2;
}

message ConfigRule_Custom {
  string resource_key = 1;
  string resource_value = 2;
}

message ConfigRule_ACL {
  EndPointId endpoint_id = 1;
  acl.AclRuleSet rule_set = 2;
}

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


// ----- Constraint ----------------------------------------------------------------------------------------------------
message Constraint_Custom {
  string constraint_type = 1;
  string constraint_value = 2;
}

message Constraint_Schedule {
  float start_timestamp = 1;
  float duration_days = 2;
}

message GPS_Position {
  float latitude = 1;
  float longitude = 2;
}

message Location {
  oneof location {
    string region = 1;
    GPS_Position gps_position = 2;
  }
}

message Constraint_EndPointLocation {
  EndPointId endpoint_id = 1;
  Location location = 2;
}

message Constraint_EndPointPriority {
  EndPointId endpoint_id = 1;
  uint32 priority = 2;
}

message Constraint_SLA_Latency {
  float e2e_latency_ms = 1;
}

message Constraint_SLA_Capacity {
  float capacity_gbps = 1;
}

message Constraint_SLA_Availability {
  uint32 num_disjoint_paths = 1;
  bool all_active = 2;
}

enum IsolationLevelEnum {
  NO_ISOLATION = 0;
  PHYSICAL_ISOLATION = 1;
  LOGICAL_ISOLATION = 2;
  PROCESS_ISOLATION = 3;
  PHYSICAL_MEMORY_ISOLATION = 4;
  PHYSICAL_NETWORK_ISOLATION = 5;
  VIRTUAL_RESOURCE_ISOLATION = 6;
  NETWORK_FUNCTIONS_ISOLATION = 7;
  SERVICE_ISOLATION = 8;
}

message Constraint_SLA_Isolation_level {
  repeated IsolationLevelEnum isolation_level = 1;
}

message Constraint {
  oneof constraint {
    Constraint_Custom custom = 1;
    Constraint_Schedule schedule = 2;
    Constraint_EndPointLocation endpoint_location = 3;
    Constraint_EndPointPriority endpoint_priority = 4;
    Constraint_SLA_Capacity sla_capacity = 5;
    Constraint_SLA_Latency sla_latency = 6;
    Constraint_SLA_Availability sla_availability = 7;
    Constraint_SLA_Isolation_level sla_isolation = 8;
  }
}


// ----- Miscellaneous -------------------------------------------------------------------------------------------------
message TeraFlowController {
  ContextId context_id = 1;
  string ip_address = 2;
  uint32 port = 3;
}

message AuthenticationResult {
  ContextId context_id = 1;
  bool authenticated = 2;
}
+0 −34
Original line number Diff line number Diff line
// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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 device;

import "context.proto";
import "monitoring.proto";

service DeviceService {
  rpc AddDevice       (context.Device    ) returns (context.DeviceId    ) {}
  rpc ConfigureDevice (context.Device    ) returns (context.DeviceId    ) {}
  rpc DeleteDevice    (context.DeviceId  ) returns (context.Empty       ) {}
  rpc GetInitialConfig(context.DeviceId  ) returns (context.DeviceConfig) {}
  rpc MonitorDeviceKpi(MonitoringSettings) returns (context.Empty       ) {}
}

message MonitoringSettings {
  monitoring.KpiId kpi_id = 1;
  monitoring.KpiDescriptor kpi_descriptor = 2;
  float sampling_duration_s = 3;
  float sampling_interval_s = 4;
}
+0 −34
Original line number Diff line number Diff line
// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (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 kpi_sample_types;

enum KpiSampleType {
    KPISAMPLETYPE_UNKNOWN                       = 0;
    KPISAMPLETYPE_PACKETS_TRANSMITTED           = 101;
    KPISAMPLETYPE_PACKETS_RECEIVED              = 102;
    KPISAMPLETYPE_PACKETS_DROPPED               = 103;
    KPISAMPLETYPE_BYTES_TRANSMITTED             = 201;
    KPISAMPLETYPE_BYTES_RECEIVED                = 202;
    KPISAMPLETYPE_BYTES_DROPPED                 = 203;
    KPISAMPLETYPE_ML_CONFIDENCE                 = 401;  //. can be used by both optical and L3 without any issue
    KPISAMPLETYPE_OPTICAL_SECURITY_STATUS       = 501;  //. can be used by both optical and L3 without any issue
    KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS        = 601;
    KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS       = 602;
    KPISAMPLETYPE_L3_UNIQUE_ATTACKERS           = 603;
    KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604;
    KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO     = 605;
    KPISAMPLETYPE_SERVICE_LATENCY_MS            = 701;
}
Loading