From ee3ef170245081db6bc72dcd5939ba8d62db8895 Mon Sep 17 00:00:00 2001 From: tangjjia Date: Wed, 21 Aug 2024 08:35:34 +0000 Subject: [PATCH 1/5] Update 3 files - /Low Latency Measurement/Outband Network Information Telemetry/an-onit.proto - /Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang - /Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang --- .../an-onit.proto | 77 ++++++ .../an-onit.yang | 243 ++++++++++++++++++ .../an-onu-uni.yang | 105 ++++++++ 3 files changed, 425 insertions(+) create mode 100644 Low Latency Measurement/Outband Network Information Telemetry/an-onit.proto create mode 100644 Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang create mode 100644 Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang 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 0000000..ebd4331 --- /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 0000000..3a9f4d4 --- /dev/null +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang @@ -0,0 +1,243 @@ +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 + "中国电信股份有限公司研究院 + China Telecom Research Institute"; + 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 + "; + description + "Copyright (c) 2024, China Telecom Corporation Limited"; + + 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 0000000..58edd3f --- /dev/null +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang @@ -0,0 +1,105 @@ +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"; + } + import an-epon-if-type { + prefix "an-eponift"; + } + + organization + "中国电信股份有限公司研究院 + Research Institute of China Telecom"; + 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 + "; + description + "Copyright (c) 2024, Research Institute of China Telecom"; + + revision 2024-08-21; + + identity onu-urefpoint { + base bbfift:ethernet-like; + description + "ONU-UNI接口的基本类型。ONU-UNI接口是承载以太网帧的接口, + 以太网帧属于ONU并且面向用户。 + 它旨在用作TR-156中定义的ONU“U参考点”(参考TR-156,第4节和第4.2节)。 + 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 + "ONU-UNI接口的增强接口配置。 + Augment interface configuration for ONU-UNI interface."; + container onu-urefpoint { + description + "ONU UNI configuration."; + } + } + + augment "/if:interfaces/if:interface/onu-urefpoint" { + description + "用于onu urefpoint接口(有时也称为“UNI”)的配置数据。 + 该数据会被送到onu物理设备。 + 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') or " + + "derived-from-or-self(/if:interfaces" + + "/if:interface[if:name = current()]/if:type," + + "'an-eponift:ani')"; + mandatory true; + description + "References the ONU to which the UNI relates."; + } + } +} \ No newline at end of file -- GitLab From 127fa6e193f53ca8543e3727d8d7153cac292661 Mon Sep 17 00:00:00 2001 From: tangjjia Date: Wed, 28 Aug 2024 07:12:36 +0000 Subject: [PATCH 2/5] Update file an-onu-uni.yang --- .../Outband Network Information Telemetry/an-onu-uni.yang | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 index 58edd3f..bf9d0dc 100644 --- a/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang @@ -12,9 +12,6 @@ module an-onu-uni { import bbf-xpon-if-type { prefix "bbf-xponift"; } - import an-epon-if-type { - prefix "an-eponift"; - } organization "中国电信股份有限公司研究院 @@ -93,10 +90,7 @@ module an-onu-uni { type if:interface-ref; must "derived-from-or-self(/if:interfaces" + "/if:interface[if:name = current()]/if:type," - + "'bbf-xponift:ani') or " - + "derived-from-or-self(/if:interfaces" - + "/if:interface[if:name = current()]/if:type," - + "'an-eponift:ani')"; + + "'bbf-xponift:ani') mandatory true; description "References the ONU to which the UNI relates."; -- GitLab From d5a96011ceb9832909af042ff65b1f8dd3b06e94 Mon Sep 17 00:00:00 2001 From: tangjjia Date: Wed, 28 Aug 2024 09:50:26 +0000 Subject: [PATCH 3/5] Update 2 files - /Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang - /Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang --- .../an-onit.yang | 5 +---- .../an-onu-uni.yang | 14 ++++---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang b/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang index 3a9f4d4..b666765 100644 --- a/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onit.yang @@ -26,8 +26,7 @@ module an-onit { } organization - "中国电信股份有限公司研究院 - China Telecom Research Institute"; + "ETSI"; contact "Editor: Liang Zhenming, China Telecom @@ -46,8 +45,6 @@ module an-onit { Leader: Zhang Dezhi, China Telecom "; - description - "Copyright (c) 2024, China Telecom Corporation Limited"; revision 2024-08-21 { description 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 index bf9d0dc..53b458e 100644 --- a/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang @@ -14,8 +14,7 @@ module an-onu-uni { } organization - "中国电信股份有限公司研究院 - Research Institute of China Telecom"; + "ETSI"; contact "Editor: Liang Zhenming, China Telecom @@ -49,17 +48,13 @@ module an-onu-uni { Leader: Zhang Dezhi, China Telecom "; - description - "Copyright (c) 2024, Research Institute of China Telecom"; revision 2024-08-21; identity onu-urefpoint { base bbfift:ethernet-like; description - "ONU-UNI接口的基本类型。ONU-UNI接口是承载以太网帧的接口, - 以太网帧属于ONU并且面向用户。 - 它旨在用作TR-156中定义的ONU“U参考点”(参考TR-156,第4节和第4.2节)。 + " 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 @@ -71,7 +66,7 @@ module an-onu-uni { augment "/if:interfaces/if:interface" { when "derived-from-or-self(if:type,'onu-urefpoint')"; description - "ONU-UNI接口的增强接口配置。 + " Augment interface configuration for ONU-UNI interface."; container onu-urefpoint { description @@ -81,8 +76,7 @@ module an-onu-uni { augment "/if:interfaces/if:interface/onu-urefpoint" { description - "用于onu urefpoint接口(有时也称为“UNI”)的配置数据。 - 该数据会被送到onu物理设备。 + " Config data intended for the onu-urefpoint interface, (sometimes also called 'UNI'). This data is brought to the ONU physical device."; -- GitLab From fc73f04e94c4eacce7430d854535a67a489c647a Mon Sep 17 00:00:00 2001 From: tangjjia Date: Wed, 28 Aug 2024 12:59:40 +0000 Subject: [PATCH 4/5] Update file an-onu-uni.yang --- .../Outband Network Information Telemetry/an-onu-uni.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 53b458e..27b4589 100644 --- a/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang @@ -84,7 +84,7 @@ module an-onu-uni { type if:interface-ref; must "derived-from-or-self(/if:interfaces" + "/if:interface[if:name = current()]/if:type," - + "'bbf-xponift:ani') + + "'bbf-xponift:ani')" mandatory true; description "References the ONU to which the UNI relates."; -- GitLab From 7bc13a14fec5345f8a4260a01f36418f3282bb36 Mon Sep 17 00:00:00 2001 From: tangjjia Date: Thu, 29 Aug 2024 11:21:33 +0000 Subject: [PATCH 5/5] Update 2 files - /LICENSE - /Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang --- LICENSE | 23 +++++++++++++++++++ .../an-onu-uni.yang | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2708889 --- /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-onu-uni.yang b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang index 27b4589..6277a88 100644 --- a/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang +++ b/Low Latency Measurement/Outband Network Information Telemetry/an-onu-uni.yang @@ -84,7 +84,7 @@ module an-onu-uni { type if:interface-ref; must "derived-from-or-self(/if:interfaces" + "/if:interface[if:name = current()]/if:type," - + "'bbf-xponift:ani')" + + "'bbf-xponift:ani')"; mandatory true; description "References the ONU to which the UNI relates."; -- GitLab