1 module o-ran-interfaces {
3 namespace "urn:o-ran:interfaces:1.0";
7 import ietf-inet-types {
15 import ietf-interfaces {
23 import ietf-hardware {
27 import ietf-yang-types {
31 import iana-hardware {
35 organization "O-RAN Alliance";
41 "This module defines the YANG definitions for managng the O-RAN
44 Copyright 2019 the O-RAN Alliance.
46 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
47 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
50 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
51 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
52 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
53 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
54 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
55 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
56 POSSIBILITY OF SUCH DAMAGE.
58 Redistribution and use in source and binary forms, with or without
59 modification, are permitted provided that the following conditions are met:
61 * Redistributions of source code must retain the above copyright notice,
62 this list of conditions and the above disclaimer.
63 * Redistributions in binary form must reproduce the above copyright notice,
64 this list of conditions and the above disclaimer in the documentation
65 and/or other materials provided with the distribution.
66 * Neither the Members of the O-RAN Alliance nor the names of its
67 contributors may be used to endorse or promote products derived from
68 this software without specific prior written permission.";
70 revision "2019-07-03" {
74 1) increasing max elements for user plane DSCP markings to 64
75 2) re-organizing layout to facilitate cross-WG adoption, whilst ensuring
76 nodes are syntactically and semantically equivalent";
78 reference "ORAN-WG4.M.0-v01.00";
81 revision "2019-02-04" {
85 1) imported model from xRAN
86 2) changed namespace and reference from xran to o-ran";
88 reference "ORAN-WG4.M.0-v01.00";
91 feature UDPIP-BASED-CU-PLANE {
93 "This feature indicates that the RU supports the UDP/IP based transport
97 feature ALIASMAC-BASED-CU-PLANE {
99 "This feature indicates that the RU supports the alias MAC address
100 based transport for the CU plane.";
109 "Priority Code Point. PCP is a 3-bit field that refers to the
110 class of service applied to a VLAN tagged frame. The
111 field specifies a priority value between 0 and 7, these values
112 can be used by quality of service (QoS) to prioritize
113 different classes of traffic.";
115 "IEEE 802.1Q-2014: Virtual Bridged Local Area Networks";
118 grouping cos-marking {
120 "Configuration data for CU Plane ethernet CoS marking";
121 container class-of-service {
124 leaf u-plane-marking {
128 "Marking used for default u-plane flows.
129 7 represents highest priority for u-plane marking";
131 leaf c-plane-marking {
134 description "7 represents highest priority for c-plane marking";
136 leaf m-plane-marking {
139 description "2 represents highest excellent effort for m-plane marking";
141 leaf s-plane-marking {
144 description "7 represents highest priority for s-plane marking";
149 description "1 represents best effort for other marking";
151 list enhanced-uplane-markings{
152 key "up-marking-name";
155 "list of mappings for enhanced (non-default) u-plane markings";
156 leaf up-marking-name {
158 description "The name of the marking";
160 leaf enhanced-marking {
162 description "the enhanced u-plane marking";
168 grouping dscp-marking {
170 "Configuration data for CU Plane DSCP marking";
171 container diffserv-markings {
173 "DSCP Configuration";
174 leaf u-plane-marking {
178 "Marking used for default u-plane flows.
179 46 represents expedited forwarding";
181 leaf c-plane-marking {
184 description "46 represents expedited forwarding";
186 leaf s-plane-marking {
189 description "46 represents expedited forwarding";
194 description "0 represents best effort forwarding";
196 list enhanced-uplane-markings{
200 "list of mappings for enhanced (non-default) u-plane markings";
201 leaf up-marking-name {
203 description "The name of the marking";
205 leaf enhanced-marking {
207 description "the enhanced u-plane marking";
213 // Cross Working Group Augmentations Follow
215 // Cross Working Group augmentations for basic Ethernet leafs
217 augment "/if:interfaces/if:interface" {
218 when "if:type = 'ianaift:ethernetCsmacd'" {
219 description "Applies to Ethernet interfaces";
222 "Augment the interface model with parameters for
223 base Ethernet interface";
232 "The maximum size of layer 2 frames that may be transmitted
233 or received on the interface (excluding any FCS overhead).
234 For Ethernet interfaces it also excludes the
235 4-8 byte overhead of any known (i.e. explicitly matched by
236 a child sub-interface) 801.1Q VLAN tags.";
242 "Indicates if VLAN tagging is used.
243 Default true is used to enable equipment to auonomously discover that it is
244 connected to a trunk port.";
249 // Cross Working Group augmentation for l2vlan interfaces for VLAN definition
251 augment "/if:interfaces/if:interface" {
252 when "if:type = 'ianaift:l2vlan'";
253 description "augments for VLAN definition";
254 leaf base-interface {
255 type if:interface-ref;
256 must "/if:interfaces/if:interface[if:name = current()]"
257 + "/o-ran-int:vlan-tagging = 'true'" {
259 "The base interface must have VLAN tagging enabled.";
262 "The base interface for the VLAN sub-interafce.";
273 // Cross Working Group augmention for both ethernetCsmacd and l2vlan interfaces
275 augment "/if:interfaces/if:interface" {
276 when "(if:type = 'ianaift:ethernetCsmacd') or
277 (if:type = 'ianaift:l2vlan')" {
278 description "Applies to ethernetCsmacd and l2vlan interfaces";
281 "Augment the interface model with parameters for all
282 both ethernetCsmacd and l2vlan interfaces.";
284 type yang:date-and-time;
287 "Timestamp of the last time the interface counters were
292 // Cross Working Group augmention to ietf-ip covering DSCP for M-Plane
294 augment "/if:interfaces/if:interface/ip:ipv4" {
295 description "augments for IPv4 based M-Plane transport";
296 leaf m-plane-marking {
299 description "18 represents AF21 or 'immediate traffic'";
302 augment "/if:interfaces/if:interface/ip:ipv6" {
303 description "augments for IPv6 based M-Plane transport";
304 leaf m-plane-marking {
307 description "18 represents AF21 or 'immediate traffic'";
311 // WG4 Specific Augmentations Follow
313 // WG4 Augmentation for basic Ethernet leafs
315 augment "/if:interfaces/if:interface" {
316 if-feature ALIASMAC-BASED-CU-PLANE;
317 when "if:type = 'ianaift:ethernetCsmacd'" {
319 "Applies to WG4 Ethernet interfaces for alias MAC based CU-Plane";
322 "Augment the interface model with parameters for
323 base Ethernet interface";
325 leaf-list alias-macs {
326 type yang:mac-address;
328 "Augments interfaces with range of alias MAC addresses.";
332 // WG4 Augmention for both ethernetCsmacd and l2vlan interfaces
334 augment "/if:interfaces/if:interface" {
335 when "(if:type = 'ianaift:ethernetCsmacd') or
336 (if:type = 'ianaift:l2vlan')" {
337 description "Applies to ethernetCsmacd and l2vlan interfaces";
340 "Augment the interface model with parameters for all
341 both ethernetCsmacd and l2vlan interfaces.";
343 type yang:mac-address;
345 "The MAC address of the interface.";
347 container port-reference {
349 "a port reference used by other O-RAN modules";
352 path '/hw:hardware/hw:component/hw:name';
354 must "derived-from-or-self(deref(current())/../hw:class, 'ianahw:port')";
355 // TAKE NOTE - depending on version of pyang, this may generate various
356 // warnings, e.g., warning: XPath for "port-name" does not exist
358 "O-RAN interfaces use a reference to a physical port component.
360 In this case, the component name referenced must be of class type
361 port, i.e., when /hw:hardware/hw:component/hw:class is derived from
367 "A number allocated by the server which identifies a port.
368 Port number value is 0 to N-1 where N is number of ports
371 This value is fixed for the lifetime of the equipment, i.e., cannot be
372 changed during equipment reboots.";
377 // WG4 specific augmention to ietf-ip covering DSCP for CUS Plane
379 augment "/if:interfaces/if:interface/ip:ipv4" {
380 if-feature UDPIP-BASED-CU-PLANE;
381 description "augments for IPv4 based CUS transport";
384 augment "/if:interfaces/if:interface/ip:ipv6" {
385 if-feature UDPIP-BASED-CU-PLANE;
386 description "augments for IPv6 based CUS transport";
390 // Other Working Group Specific Augmentations Follow Here
393 rpc reset-interface-counters {
395 "Management plane triggered restart of the interface counters.";