diff --git a/PROTOBUF/tapi-streaming-performance.proto b/PROTOBUF/tapi-streaming-performance.proto new file mode 100644 index 00000000..84ab69ad --- /dev/null +++ b/PROTOBUF/tapi-streaming-performance.proto @@ -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"]; +} +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"]; +} +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; +} diff --git a/YANG/tapi-common.yang b/YANG/tapi-common.yang index 711d1a8b..bbf06be5 100644 --- a/YANG/tapi-common.yang +++ b/YANG/tapi-common.yang @@ -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"; } diff --git a/YANG/tapi-connectivity.yang b/YANG/tapi-connectivity.yang index 8fbb8fbd..ae41b762 100644 --- a/YANG/tapi-connectivity.yang +++ b/YANG/tapi-connectivity.yang @@ -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"; } @@ -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"; } @@ -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"; } @@ -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"; } diff --git a/YANG/tapi-topology.yang b/YANG/tapi-topology.yang index 87c73883..693c62e9 100644 --- a/YANG/tapi-topology.yang +++ b/YANG/tapi-topology.yang @@ -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"; } @@ -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"; }