diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2708889c31a25bec89b466c00cbfc7619617f6e7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +Copyright 2024 ETSI + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Low Latency Measurement/Outband Network Information Telemetry/an-onit.proto b/Low Latency Measurement/Outband Network Information Telemetry/an-onit.proto new file mode 100644 index 0000000000000000000000000000000000000000..ebd433140696958f31f56ed40bf7e0bc55df9da5 --- /dev/null +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onit.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; +// module an-onit +// namespace urn:urn:an:yang:an-onit + +package an_onit; + +message Onit { + message FlowStatistics { + message FlowStatistic { + // Indicates the global instance ID, it consists of node ID and instance ID + // [63.............40] [39..................20] [19..................0] + // reversed bit[63~40] [nodeId:20bit,bit[39~20]] [instanceId:20bit,bit[19~0]] + uint64 flow_id = 1 [json_name = "flow-id"]; + + // Sample interval + uint32 interval = 2 [json_name = "interval"]; + + // Indicates the measure mode of an onit flow + enum MeasureMode { + MeasureModeE2e = 1; + MeasureModeTrace = 2; + }; + MeasureMode measure_mode = 3 [json_name = "measure-mode"]; + // Indicates the direction of an ethernet port or gpon port + // 1:Indicates the inbound direction of the test start or end node + // 2:Indicates the ingress direction of the intermediate node + // 3:Indicates the egress direction of the intermediate node + // 4:Indicates the egress direction of the test start or end node + enum Direction { + INVALID_ENUM_VALUE_Direction = 0; + Direction_INGRESS = 1; + Direction_TRANSITX_INPUT = 2; + Direction_TRANSITX_OUTPUT = 3; + Direction_EGRESS = 4; + }; + Direction direction = 4 [json_name = "direction"]; + // Source MAC + string source_mac = 5 [json_name = "source-mac"]; + + // Destination MAC + string destination_mac = 6 [json_name = "destination-mac"]; + + // Vlan tag 0 + uint32 vlan_tag_0 = 7 [json_name = "vlan-tag-0"]; + + // Vlan tag 1 + uint32 vlan_tag_1 = 8 [json_name = "vlan-tag-1"]; + + // Rate of the measurement flow, unit in frames per second + uint32 rate = 9 [json_name = "rate"]; + + // Size of the measurement frame, unit in bytes + uint32 frame_length = 10 [json_name = "frame-size"]; + + // Number of packets in a sample interval + uint64 packet_count = 9 [json_name = "packet-count"]; + + // Number of bytes in a sample interval + uint64 byte_count = 10 [json_name = "byte-count"]; + + // Indicates the min delay of an onit flow + uint32 min_delay = 11 [json_name = "min-delay"]; + + // Indicates the max delay of an onit flow + uint32 max_delay = 12 [json_name = "max-delay"]; + + // Indicates the average delay of an onit flow + uint32 avg_delay = 13 [json_name = "avg-delay"]; + + // Indicates the name of an Ethernet port or gpon port + string if_name = 14 [json_name = "if-name"]; + } + repeated FlowStatistic flow_statistic = 1 [json_name = "flow-statistic"]; + } + FlowStatistics flow_statistics = 1 [json_name = "flow-statistics"]; +} + diff --git a/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang b/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang new file mode 100644 index 0000000000000000000000000000000000000000..b6667659a4a952b77d43882c02c4dc401496cf24 --- /dev/null +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang @@ -0,0 +1,240 @@ +module an-onit { + yang-version 1.1; + namespace "urn:an:yang:an-onit"; + prefix an-onit; + + import ietf-yang-types { + prefix yang; + } + import iana-if-type { + prefix ianaift; + } + import ietf-interfaces { + prefix if; + } + import bbf-xpon-if-type { + prefix bbf-xponift; + } + import bbf-dot1q-types { + prefix bbf-dot1qt; + } + import bbf-frame-classification { + prefix bbf-classif; + } + import an-onu-uni { + prefix an-onu-uni; + } + + organization + "ETSI"; + contact + "Editor: Liang Zhenming, China Telecom + + + Editor: Yang Ziyao, China Telecom + + + Editor: Tang Jian, China Telecom + + + Editor: Liang Fan, CICT + + + Editor: Li Rui, CICT + + + Leader: Zhang Dezhi, China Telecom + "; + + revision 2024-08-21 { + description + "Initial revision."; + } + + feature an-onit { + description + "Device support an-onit."; + } + + typedef port-role-type { + type enumeration { + enum ingress-egress { + value 1; + description + "Ingress/egress role."; + } + enum transit { + value 2; + description + "Transit role."; + } + } + description + "The port role type of onit."; + } + + container onit { + if-feature "an-onit"; + description + "Configurations of outband network information telemetry."; + leaf enabled { + type boolean; + default "false"; + description + "Enable onit."; + } + container global { + description + "Configure global parameter of onit."; + leaf node-id { + type uint32 { + range "1..1048575"; + } + description + "Node ID of onit."; + } + } + container measure-flows { + list measure-flow { + key "name"; + description + "The list of measurement flows."; + leaf name { + type string; + description + "The name of the measurement flow."; + } + leaf destination-mac-address { + type yang:mac-address; + mandatory true; + description + "Destination mac address of the measurement frame."; + } + leaf source-mac-address { + type yang:mac-address; + mandatory true; + description + "Source mac address of the measurement frame."; + } + list vlan-tag { + key "index"; + min-elements 1; + max-elements 2; + description + "Vlan tags of the measurement frame, index 0 + indicates the outermost tag."; + leaf index { + type bbf-classif:tag-index; + must '(count(../../vlan-tag[index = 0]) > 0)' { + error-message + "An inner tag can only exist if an outer tag is also + specified."; + description + "Only allow a push of an inner tag if an outer tag is + also being pushed."; + } + description + "The index into the tag stack, outermost tag first."; + } + leaf vlan-id { + type bbf-dot1qt:vlan-id; + mandatory true; + description + "Vlan id in the tag."; + } + leaf pbit { + type bbf-dot1qt:pbit; + default "0"; + description + "Pbit in the tag."; + } + } + } + } + container measure-instances { + list measure-instance { + key "instance-id"; + description + "The list of measurement instances."; + leaf instance-id { + type uint32 { + range "1..1048575"; + } + description + "The id of the measurement instance."; + } + leaf measure-flow { + type leafref { + path "/an-onit:onit/measure-flows/measure-flow/name"; + } + description + "The name of the referenced measurement flow."; + } + leaf enable { + type boolean; + default "true"; + description + "Enable or disable the measurement instance."; + } + leaf rate { + type uint32; + units "frames per second"; + mandatory true; + description + "The transmission rate of the measurement flow."; + } + leaf frame-size { + type uint32; + units "bytes"; + mandatory true; + description + "The size of the measurement frame."; + } + leaf sample-interval { + type uint16; + units "seconds"; + default "30"; + description + "The interval of measurement result reported by the device."; + } + } + } + } + + augment "/if:interfaces-state/if:interface" { + if-feature "an-onit:an-onit"; + when "derived-from-or-self(if:type, 'bbf-xponift:ani') or " + + "derived-from-or-self(if:type, 'ianaift:ethernetCsmacd') or " + + "derived-from-or-self(if:type, 'an-onu-uni:onu-urefpoint') or " + + "derived-from-or-self(if:type, 'bbf-xponift:channel-group')"; + description + "Augment onit measurement mac address for onu's and olt's interface."; + leaf onit-mac-address { + type yang:mac-address; + config false; + description + "This data shall be used as the source or destination mac address of + an onit measure flow."; + } + } + + augment "/if:interfaces/if:interface" { + if-feature "an-onit:an-onit"; + when "derived-from-or-self(if:type, 'bbf-xponift:ani') or " + + "derived-from-or-self(if:type, 'ianaift:ethernetCsmacd') or " + + "derived-from-or-self(if:type, 'an-onu-uni:onu-urefpoint') or " + + "derived-from-or-self(if:type, 'bbf-xponift:channel-group')"; + description + "The onit role type augment to the interface."; + container onit-roles { + description + "Configure the onit role type applying to the interface."; + leaf role-type { + type port-role-type; + default "ingress-egress"; + description + "Specify the role type"; + } + } + } +} diff --git a/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang new file mode 100644 index 0000000000000000000000000000000000000000..6277a88dff7e43355269e837038b6d8cd2f47f0b --- /dev/null +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang @@ -0,0 +1,93 @@ +module an-onu-uni { + yang-version 1.1; + namespace "urn:an:yang:an-onu-uni"; + prefix "an-onu-uni"; + + import ietf-interfaces { + prefix "if"; + } + import bbf-if-type { + prefix "bbfift"; + } + import bbf-xpon-if-type { + prefix "bbf-xponift"; + } + + organization + "ETSI"; + contact + "Editor: Liang Zhenming, China Telecom + + + Editor: Yang Ziyao, China Telecom + + + Editor: Tang Jian, China Telecom + + + Editor: Wang Kaiyue, China Telecom + + + Editor: Shi Shuguang, Huawei + + + Editor: Huang Yueping, Huawei + + + Editor: Liang Fan, CICT + + + Editor: Li Rui, CICT + + + Editor: Xie Yu, ZTE + + + Editor: Ni Shenliu, ZTE + + + Leader: Zhang Dezhi, China Telecom + "; + + revision 2024-08-21; + + identity onu-urefpoint { + base bbfift:ethernet-like; + description + " + Base type for ONU-UNI interfaces. The ONU-UNI + interface is a interface which carry ethernet + frames, which belong to the ONU and which is facing + the user. + It is intended for use as ONU 'U reference point' + defined in TR-156 (ref TR-156, Section 4 and 4.2)."; + } + + augment "/if:interfaces/if:interface" { + when "derived-from-or-self(if:type,'onu-urefpoint')"; + description + " + Augment interface configuration for ONU-UNI interface."; + container onu-urefpoint { + description + "ONU UNI configuration."; + } + } + + augment "/if:interfaces/if:interface/onu-urefpoint" { + description + " + Config data intended for the onu-urefpoint interface, + (sometimes also called 'UNI'). + This data is brought to the ONU physical device."; + leaf related-onu { + type if:interface-ref; + must "derived-from-or-self(/if:interfaces" + + "/if:interface[if:name = current()]/if:type," + + "'bbf-xponift:ani')"; + mandatory true; + description + "References the ONU to which the UNI relates."; + } + } +} \ No newline at end of file