Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions PROTOBUF/tapi-streaming-performance.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
//
// Copyright (c) 2025 Linux Foundation (LF). All rights reserved.
//
// 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";

//
// This package defines message types used to represent a performance measurement record
// in a TAPI stream as per the specifications in TR-548.
//
package tapi;

option java_multiple_files = true;
option java_outer_classname = "TapiGnmi";
option java_package = "org.linuxfoundation.onmi.tapi";

message StreamDetails {
MeasurementDetails measurement_details = 1 [json_name = "measurement-details"];
}
message MeasurementDetails {
uint64 time_measurement_was_sampled = 1 [json_name = "time-measurement-was-sampled"];
QualifiedMeasuredValue qualified_measured_value = 2 [json_name = "qualified-measured-value"];
string native_resource_id = 3 [json_name = "native-resource-id"];
SampleQualifier sample_qualifier = 4 [json_name = "sample-qualifier"];
RelativePosition relative_position_of_measurement = 5 [json_name = "relative-position-of-measurement"];
DirectionOfMeasuredSignal direction_of_measured_signal = 6 [json_name = "direction-of-measured-signal"];
uint64 sample_interval = 7 [json_name = "sample-interval"];
string abstract_resource_ref = 8 [json_name = "abstract-resource-ref"];
string native_measurement_type = 9 [json_name = "native-measurement-type"];
NormalizedMeasurementType normalized_measurement_type = 10 [json_name = "normalized-measurement-type"];
repeated QualifiedMeasurement qualified_measurement = 11 [json_name = "qualified-measurement"];
string connection_end_point = 12 [json_name = "connection-end-point"];
string maintenance_intermediate_point = 13 [json_name = "maintenance-intermediate-point"];
string maintenance_end_point = 14 [json_name = "maintenance-end-point"];
uint64 measurement_start_time = 15 [json_name = "measurement-start-time"];
repeated QualifiedMeasuredValue qualified_measured_value_set = 16 [json_name = "qualified-measured-value-set"];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add the following here:

repeated NameAndValue additionalInfo = 17 [json_name = "additional-info"];

And define NameAndValue as:

message NameAndValue {
    string valueName = 1 [json_name = "value-name"];
    string value = 2;
}

This will be required to be consistent with the yang model in tapi-gnmi-streaming.yang.

}
message QualifiedMeasurement {
uint64 time_measurement_was_sampled = 1 [json_name = "time-measurement-was-sampled"];
QualifiedMeasuredValue qualified_measured_value = 2 [json_name = "qualified-measured-value"];
string native_resource_id = 3 [json_name = "native-resource-id"];
SampleQualifier sample_qualifier = 4 [json_name = "sample-qualifier"];
RelativePosition relative_position_of_measurement = 5 [json_name = "relative-position-of-measurement"];
DirectionOfMeasuredSignal direction_of_measured_signal = 6 [json_name = "direction-of-measured-signal"];
uint64 sample_interval = 7 [json_name = "sample-interval"];
string abstract_resource_ref = 8 [json_name = "abstract-resource-ref"];
string native_measurement_type = 9 [json_name = "native-measurement-type"];
NormalizedMeasurementType normalized_measurement_type = 10 [json_name = "normalized-measurement-type"];
uint64 list_index = 11 [json_name ="list-index"];
string connection_end_point = 12 [json_name = "connection-end-point"];
string maintenance_intermediate_point = 13 [json_name = "maintenance-intermediate-point"];
string maintenance_end_point = 14 [json_name = "maintenance-end-point"];
uint64 measurement_start_time = 15 [json_name = "measurement-start-time"];
repeated QualifiedMeasuredValue qualified_measured_value_set = 16 [json_name = "qualified-measured-value-set"];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add the following here also:

repeated NameAndValue additionalInfo = 17 [json_name = "additional-info"];

This will be required to be consistent with the yang model in tapi-gnmi-streaming.yang.

}
message QualifiedMeasuredValue {
double value = 1 [json_name = "value"];
ValueQualifier value_qualifier = 2 [json_name = "value-qualifier"];
string units = 3 [json_name = "units"];
string qualified_value_name = 4 [json_name = "qualified-value-name"];
string qualified_location_name = 5 [json_name = "qualified-location-name"];
string qualified_measurement_type = 6 [json_name = "qualified-measurement-type"];
}
enum ValueQualifier {
OK = 0;
INVALID = 1;
SUSPECT = 2;
MISSING = 3;
PARTIAL = 4;
}
enum RelativePosition {
NEAR_END = 0;
FAR_END = 1;
NOT_APPLICABLE = 2;
ALL_LOCATIONS = 3;
}
enum DirectionOfMeasuredSignal {
NO_DIRECTION = 0;
RECEIVE = 1;
TRANSMIT = 2;
RECEIVE_AND_TRANSMIT = 3;
CONTRA_RECEIVE = 4;
CONTRA_TRANSMIT = 5;
CONTRA_RECEIVE_AND_CONTRA_TRANSMIT = 6;
}
enum SampleQualifier {
NORMAL = 0;
DELAYED = 1;
FINAL = 2;
FIRST = 3;
BASELINE=4;
}

enum NormalizedMeasurementType {
NO_NORMALIZED_TYPE = 0;
BBE = 1;
CHROM_DISP = 2;
DELAY_FRAME_COUNT = 3;
DIFF_GROUP_DELAY = 4;
FEC_CORRECTABLE_BLOCKS = 5;
FEC_CORRECTED_BITS = 6;
FEC_CORRECTED_BYTES = 7;
FEC_CORRECTED_CODEWORDS = 8;
FEC_CORRECTED_ERRORS = 9;
FEC_POST_FEC_BER = 10;
FEC_PRE_FEC_BER = 11;
FEC_SYMBOL_ERRORS = 12;
FEC_UNCORRECTABLE_BITS = 13;
FEC_UNCORRECTABLE_BLOCKS = 14;
FEC_UNCORRECTABLE_BYTES = 15;
FEC_UNCORRECTABLE_WORDS = 16;
FEC_UNCORRECTED_CODEWORDS = 17;
FREQ_OFFS = 18;
OPTICAL_GAIN = 19;
OPT_PWR_SPECTR_DENS_INPUT = 20;
OPT_PWR_SPECTR_DENS_OUTPUT = 21;
OPT_TOTAL_PWR_INPUT = 22;
OPT_TOTAL_PWR_OUTPUT = 23;
OPTICAL_TILT = 24;
POL_MODE_DISP = 25;
SES = 26;
UAS = 27;
VOA_INPUT = 28;
VOA_OUTPUT = 29;
}
1 change: 1 addition & 0 deletions YANG/tapi-common.yang
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ module tapi-common {
leaf profile-uuid {
type leafref {
path '/tapi-common:context/tapi-common:profile/tapi-common:uuid';
require-instance false;
}
description "none";
}
Expand Down
4 changes: 4 additions & 0 deletions YANG/tapi-connectivity.yang
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ module tapi-connectivity {
leaf connection-end-point-uuid {
type leafref {
path '/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:cep-list/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';
require-instance false;
}
description "none";
}
Expand All @@ -400,6 +401,7 @@ module tapi-connectivity {
leaf switch-control-uuid {
type leafref {
path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:switch-control/tapi-connectivity:uuid';
require-instance false;
}
description "none";
}
Expand All @@ -410,6 +412,7 @@ module tapi-connectivity {
leaf switch-local-id {
type leafref {
path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:switch-control/tapi-connectivity:switch/tapi-connectivity:local-id';
require-instance false;
}
description "none";
}
Expand All @@ -420,6 +423,7 @@ module tapi-connectivity {
leaf route-local-id {
type leafref {
path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:route/tapi-connectivity:local-id';
require-instance false;
}
description "none";
}
Expand Down
2 changes: 2 additions & 0 deletions YANG/tapi-topology.yang
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ module tapi-topology {
leaf topology-uuid {
type leafref {
path '/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:uuid';
require-instance false;
}
description "none";
}
Expand All @@ -366,6 +367,7 @@ module tapi-topology {
leaf node-uuid {
type leafref {
path '/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:uuid';
require-instance false;
}
description "none";
}
Expand Down