Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-processing-element@2022-08-15.yang
1 module o-ran-processing-element {
2   yang-version 1.1;
3   namespace "urn:o-ran:processing-element:1.0";
4   prefix "o-ran-elements";
5
6   import ietf-yang-types {
7     prefix yang;
8   }
9
10   import ietf-inet-types {
11     prefix "inet";
12   }
13
14   import ietf-interfaces {
15     prefix "if";
16   }
17
18   import ietf-ip {
19     prefix "ip";
20   }
21
22   import o-ran-interfaces {
23     prefix "o-ran-int";
24   }
25
26   import o-ran-wg4-features {
27     prefix "feat";
28   }
29
30   import o-ran-usermgmt {
31     prefix "or-user";
32   }
33
34   organization "O-RAN Alliance";
35
36   contact
37     "www.o-ran.org";
38
39   description
40     "This module defines the YANG definitions for mapping of transport flows to
41     processing elements. Three options are supported:
42     i) virtual MAC based mapping
43     ii) MAC address + VLAN-ID based mapping
44     iii) UDP/IP based mapping
45
46     Copyright 2020 the O-RAN Alliance.
47
48     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
49     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
50     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
51     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
52     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
53     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
54     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
55     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
56     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
57     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
58     POSSIBILITY OF SUCH DAMAGE.
59
60     Redistribution and use in source and binary forms, with or without
61     modification, are permitted provided that the following conditions are met:
62
63     * Redistributions of source code must retain the above copyright notice,
64     this list of conditions and the above disclaimer.
65     * Redistributions in binary form must reproduce the above copyright notice,
66     this list of conditions and the above disclaimer in the documentation
67     and/or other materials provided with the distribution.
68     * Neither the Members of the O-RAN Alliance nor the names of its
69     contributors may be used to endorse or promote products derived from
70     this software without specific prior written permission.";
71
72   revision "2022-08-15" {
73     description
74       "version 10.0.0
75
76       1) introducing SHARED-ORU-MULTI-OPERATOR feature
77       2) fixing constraints";
78
79     reference "ORAN-WG4.M.0-v10.00";
80   }
81
82   revision "2021-12-01" {
83     description
84       "version 8.0.0
85
86       1) typographical corrections in descriptions.
87       2) Add support for multiple transport-session-type per O-RU";
88
89     reference "ORAN-WG4.M.0-v08.00";
90   }
91
92
93   revision "2020-04-17" {
94     description
95       "version 3.0.0
96
97       1) added new enum SHARED-CELL-ETH-INTERFACE in
98          transport-session-type and new containers north-eth-flow and
99          south-eth-flow to enable Shared cell scenario.";
100
101     reference "ORAN-WG4.M.0-v03.00";
102   }
103
104   revision "2019-07-03" {
105     description
106       "version 1.1.0
107
108       1) added new leaf to enable O-RU to report the maximum number of
109       transport flows it can support, e.g., due to restrictions on number
110       of VLAN-IDs when Ethernet type transport is used.";
111
112     reference "ORAN-WG4.M.0-v01.00";
113   }
114   revision "2019-02-04" {
115     description
116       "version 1.0.0
117
118       1) imported model from xRAN
119       2) changed namespace and reference from xran to o-ran";
120
121     reference "ORAN-WG4.M.0-v01.00";
122   }
123
124   feature SHARED_CELL {
125     description
126       "Presence of feature indicates that this O-RU is capable to support
127        shared cell.";
128   }
129 // groupings
130
131   grouping non-shared-cell-flow-group {
132     description "a grouping for non-shared cell O-RU flows";
133
134     container aliasmac-flow {
135       when "../../../transport-session-type = 'ALIASMAC-INTERFACE'";
136       if-feature o-ran-int:ALIASMAC-BASED-CU-PLANE;
137       description "leafs for virtual mac type data flows";
138       leaf ru-aliasmac-address {
139         type leafref {
140           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:alias-macs";
141         }
142         mandatory true;
143         description
144           "O-RU's alias MAC address used for alias MAC based flow";
145       }
146       leaf vlan-id {
147         type leafref {
148           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
149         }
150         description
151           "O-RU's VLAN-ID used for alias MAC based flow";
152       }
153       leaf o-du-mac-address {
154         type yang:mac-address;
155         mandatory true;
156         description
157           "O-DU's MAC address used for alias MAC based flow";
158       }
159     }
160     container eth-flow {
161       when "../../../transport-session-type = 'ETH-INTERFACE'";
162       description "leafs for mac + vlan-id type data flows";
163       leaf ru-mac-address {
164         type leafref {
165           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address";
166         }
167         mandatory true;
168         description
169           "O-RU's MAC address used for Ethernet based flow";
170       }
171       leaf vlan-id {
172         type leafref {
173           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
174         }
175         mandatory true;
176         description
177           "O-RU's VLAN-ID used for Ethernet based flow";
178       }
179       leaf o-du-mac-address {
180         type yang:mac-address;
181         mandatory true;
182         description
183           "O-DU's MAC address used for Ethernet based flow";
184       }
185     }
186     container udpip-flow {
187       when "../../../transport-session-type = 'UDPIP-INTERFACE'";
188       description "leafs for UDP/IP type data flows";
189       choice address {
190         leaf ru-ipv4-address {
191           type leafref {
192             path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv4/ip:address/ip:ip";
193           }
194           description "O-RU's IPv4 address";
195         }
196         leaf ru-ipv6-address {
197           type leafref {
198             path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv6/ip:address/ip:ip";
199           }
200           description "O-RU's IPv6 address";
201         }
202         mandatory true;
203         description "choice of O-RU IPv4 or IPv6 address";
204       }
205       leaf o-du-ip-address {
206         type inet:ip-address;
207         mandatory true;
208         description "O-DU's IP address";
209       }
210       leaf ru-ephemeral-udp-port {
211         type inet:port-number;
212         mandatory true;
213         description
214           "ephemeral port used by O-RU";
215       }
216       leaf o-du-ephemeral-udp-port {
217         type inet:port-number;
218         mandatory true;
219         description
220           "ephemeral port used by O-DU";
221       }
222       leaf ecpri-destination-udp {
223         type inet:port-number;
224         mandatory true;
225         description "the well-known UDP port number used by eCPRI";
226         // fixme - add in a default when allocated by IANA
227       }
228     }
229   }
230
231   grouping shared-cell-flow-group {
232     description "a grouping for shared cell O-RU flows";
233
234     container north-eth-flow {
235       when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'";
236       if-feature "SHARED_CELL";
237       description "leafs for mac + vlan-id type data flows";
238       leaf ru-mac-address {
239         type leafref {
240           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address";
241         }
242         description
243           "O-RU's MAC address used for Ethernet based flow";
244       }
245       leaf vlan-id {
246         type leafref {
247           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
248         }
249         description
250           "O-RU's VLAN-ID used for Ethernet based flow";
251       }
252       leaf north-node-mac-address {
253         type yang:mac-address;
254         description
255           "North-node's MAC address used for Ethernet based flow";
256       }
257     }
258     container south-eth-flow {
259       when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'";
260       if-feature "SHARED_CELL";
261       description "leafs for mac + vlan-id type data flows";
262       leaf ru-mac-address {
263         type leafref {
264           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address";
265         }
266         description
267           "O-RU's MAC address used for Ethernet based flow";
268       }
269       leaf vlan-id {
270         type leafref {
271           path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
272         }
273         description
274           "O-RU's VLAN-ID used for Ethernet based flow";
275       }
276       leaf south-node-mac-address {
277         type yang:mac-address;
278         description
279           "south-node's MAC address used for Ethernet based flow";
280       }
281     }
282   }
283
284   grouping session-and-markings-group {
285     description "a grouping with transport session type and enhanced uplane markings";
286
287     leaf transport-session-type {
288       type enumeration {
289         enum ETH-INTERFACE {
290           description "VLAN based CUS Transport ";
291         }
292         enum UDPIP-INTERFACE {
293           description "UDP/IP based CUS Transport ";
294         }
295         enum ALIASMAC-INTERFACE{
296           description "Alias MAC address based CUS Transport ";
297         }
298         enum SHARED-CELL-ETH-INTERFACE {
299           if-feature "SHARED_CELL";
300           description "VLAN based CUS Transport used for Shared Cell scenario";
301         }
302       }
303       default ETH-INTERFACE;
304       description
305         "the type of transport session used for identifying different processing
306         elements";
307     }
308     container enhanced-uplane-mapping {
309       presence "indicates that enhanced uplane mapping is used";
310       description "a mapping table for enhanced user plane marking";
311       list uplane-mapping {
312         key "up-marking-name";
313         description
314           "a mapping between up-link name and o-ran-interfaces:up-marking-name";
315         leaf up-marking-name {
316           type string;
317           description "a unique up marking name that is used for enhanced up marking";
318         }
319         choice up-markings {
320           description
321             "U-Plane markings";
322           case ethernet {
323             when "(../../transport-session-type = 'ALIASMAC-INTERFACE') or
324             (../../transport-session-type = 'ETH-INTERFACE') or
325             (../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE')";
326             leaf up-cos-name {
327               type leafref {
328                 path "/if:interfaces/if:interface/o-ran-int:class-of-service/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
329               }
330               description "the Ethernet U-plane transport marking as defined in o-ran-interfaces";
331             }
332           }
333           case ipv4 {
334             when "(../../transport-session-type = 'UDPIP-INTERFACE')";
335             leaf upv4-dscp-name {
336              if-feature o-ran-int:UDPIP-BASED-CU-PLANE;
337               type leafref {
338                 path "/if:interfaces/if:interface/ip:ipv4/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
339               }
340               description "the IPv4 U-plane transport marking as defined in o-ran-interfaces";
341             }
342           }
343           case ipv6 {
344             when "(../../transport-session-type = 'UDPIP-INTERFACE')";
345             leaf upv6-dscp-name {
346              if-feature o-ran-int:UDPIP-BASED-CU-PLANE;
347               type leafref {
348                 path "/if:interfaces/if:interface/ip:ipv6/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
349               }
350               description "the IPv6 U-plane transport marking as defined in o-ran-interfaces";
351             }
352           }
353         }
354       }
355     }
356   }
357
358   grouping pe-group {
359     description "a grouping of processing elements";
360     leaf maximum-number-of-transport-flows {
361       type uint16 {
362         range "1..4094";
363       }
364       default 4094;
365       config false;
366       description
367         "The maximum number of transport flows that can be supported by an O-RU";
368     }
369     uses session-and-markings-group;
370
371     list ru-elements {
372       key "name";
373       description
374         "the list of transport definitions for each processing element";
375       leaf name {
376         type string {
377           length "1..255";
378         }
379         description
380           "A name that is unique across the O-RU that identifies a processing
381           element instance.
382
383           This name may be used in fault management to refer to a fault source
384           or affected object";
385       }
386       leaf sro-id {
387         if-feature feat:SHARED-ORU-MULTI-OPERATOR;
388         type leafref {
389           path "/or-user:users/or-user:user/or-user:sro-id";
390         }
391         description
392           "The identity of a shared resource operator. When present,
393           indicates that the list entry corresponds to a processing element
394           associated with a shared resource operator where the sro-id identifies
395           the specific shared resource operator";
396       }
397       container transport-flow {
398         description
399           "container for the transport-flow used for CU plane";
400         leaf interface-name {
401           type leafref {
402             path "/if:interfaces/if:interface/if:name";
403           }
404           description "the interface name ";
405         }
406         uses non-shared-cell-flow-group;
407         uses shared-cell-flow-group;
408
409       }
410     }
411     list additional-transport-session-type-elements {
412       if-feature "feat:MULTIPLE-TRANSPORT-SESSION-TYPE";
413       key transport-session-type;
414
415       description
416         "Added to support multiple transport-session-type per O-RU,
417          it is always assumed that /processing-elements/ru-elements/ is configured with the first type of transport,
418          and /processing-element/additional-transport-session-elements/ru-elements/ is configured with the other types of transport.
419          If the O-RU is configured for shared-cell, this list will not be used. An O-RU shall reject any configuration
420          with a list entry with transport-session-type set to SHARED-CELL-ETH-INTERFACE";
421
422       uses session-and-markings-group;
423
424       list ru-elements {
425         key "name";
426         description
427           "the list of transport definitions for each processing element";
428         leaf name {
429           type string {
430             length "1..255";
431           }
432           description
433             "A name that is unique across the O-RU that identifies a processing
434             element instance.
435
436             This name may be used in fault management to refer to a fault source
437             or affected object";
438         }
439         leaf sro-id {
440           if-feature feat:SHARED-ORU-MULTI-OPERATOR;
441           type leafref {
442             path "/or-user:users/or-user:user/or-user:sro-id";
443           }
444           description
445             "The identity of a shared resource operator. When present,
446             indicates that the list entry corresponds to a processing element
447             associated with a shared resource operator where the sro-id identifies
448             the specific shared resource operator";
449         }
450         container transport-flow {
451           description
452             "container for the transport-flow used for CU plane";
453           leaf interface-name {
454             type leafref {
455               path "/if:interfaces/if:interface/if:name";
456             }
457             description "the interface name ";
458           }
459           uses non-shared-cell-flow-group;
460         }
461       }
462     }
463   }
464
465 // top-level container
466
467   container processing-elements {
468     description
469       "a model defining the mapping between transport flows and arbitrary
470       O-RAN processing elements. A processing element may be then defined for
471       handling connectivity or delay procedures, or defined with a corresponding
472       eaxcid for CU plane operations";
473     uses pe-group;
474   }
475 }