Add supoprt for D release use-case.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / o-ran-processing-element@2020-04-17.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   organization "O-RAN Alliance";
27
28   contact
29     "www.o-ran.org";
30
31   description
32     "This module defines the YANG definitions for mapping of transport flows to
33     processing elements. Three options are supported:
34     i) virtual MAC based mapping
35     ii) MAC addrress + VLAN-ID based mapping
36     iii) UDP/IP based mapping
37
38     Copyright 2020 the O-RAN Alliance.
39
40     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
41     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
44     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
45     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
46     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
47     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
48     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
50     POSSIBILITY OF SUCH DAMAGE.
51
52     Redistribution and use in source and binary forms, with or without
53     modification, are permitted provided that the following conditions are met:
54
55     * Redistributions of source code must retain the above copyright notice,
56     this list of conditions and the above disclaimer.
57     * Redistributions in binary form must reproduce the above copyright notice,
58     this list of conditions and the above disclaimer in the documentation
59     and/or other materials provided with the distribution.
60     * Neither the Members of the O-RAN Alliance nor the names of its
61     contributors may be used to endorse or promote products derived from
62     this software without specific prior written permission.";
63
64     revision "2020-04-17" {
65       description
66         "version 3.0.0
67
68         1) added new enum SHARED-CELL-ETH-INTERFACE in
69            transport-session-type and new containers north-eth-flow and
70            south-eth-flow to enable Shared cell scenario.";
71
72       reference "ORAN-WG4.M.0-v03.00";
73     }
74
75   revision "2019-07-03" {
76     description
77       "version 1.1.0
78
79       1) added new leaf to enable O-RU to report the maximum number of
80       transport flows it can support, e.g., due to restrictions on number
81       of VLAN-IDs when ethernet type transport is used.";
82
83     reference "ORAN-WG4.M.0-v01.00";
84   }
85   revision "2019-02-04" {
86     description
87       "version 1.0.0
88
89       1) imported model from xRAN
90       2) changed namespace and reference from xran to o-ran";
91
92     reference "ORAN-WG4.M.0-v01.00";
93   }
94
95   feature SHARED_CELL {
96     description
97       "Presence of feature indicates that this O-RU is capable to support
98        shared cell.";
99   }
100 // groupings
101
102   grouping pe-group {
103     leaf maximum-number-of-transport-flows {
104       type uint16 {
105         range "1..4094";
106       }
107       config false;
108       default 4094;
109       description
110         "The maximum number of transport flows that can be supported by an O-RU";
111     }
112     leaf transport-session-type {
113       type enumeration {
114         enum ETH-INTERFACE {
115           description "VLAN based CUS Transport ";
116         }
117         enum UDPIP-INTERFACE {
118           description "UDP/IP based CUS Transport ";
119         }
120         enum ALIASMAC-INTERFACE{
121           description "Alias MAC address based CUS Transport ";
122         }
123         enum SHARED-CELL-ETH-INTERFACE {
124           if-feature "SHARED_CELL";
125           description "VLAN based CUS Transport used for Shared Cell scenario";
126         }
127       }
128       default ETH-INTERFACE;
129       description
130         "the type of transport session used for identifying different processing
131         elements";
132     }
133     container enhanced-uplane-mapping {
134       presence "indicates that enhanced uplane mapping is used";
135       description "a mapping table for enhanced user plane marking";
136       list uplane-mapping {
137         key "up-marking-name";
138         description
139           "a mapping between up-link name and o-ran-interfaces:up-marking-name";
140         leaf up-marking-name {
141           type string;
142           description "a unique up marking name that is used for enhanced up marking";
143         }
144         choice up-markings {
145           description
146             "U-Plane markings";
147           case ethernet {
148             when "(../../transport-session-type = 'ALIASMAC-INTERFACE') or
149             (../../transport-session-type = 'ETH-INTERFACE') or
150             (../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE')";
151             leaf up-cos-name {
152               type leafref {
153                 path "/if:interfaces/if:interface/o-ran-int:class-of-service/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
154               }
155               description "the Ethernet U-plane transport marking as defined in o-ran-interfaces";
156             }
157           }
158           case ipv4 {
159             when "(../../transport-session-type = 'UDPIP-INTERFACE')";
160             leaf upv4-dscp-name {
161               type leafref {
162                 path "/if:interfaces/if:interface/ip:ipv4/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
163               }
164               description "the IPv4 U-plane transport marking as defined in o-ran-interfaces";
165             }
166           }
167           case ipv6 {
168             when "(../../transport-session-type = 'UDPIP-INTERFACE')";
169             leaf upv6-dscp-name {
170               type leafref {
171                 path "/if:interfaces/if:interface/ip:ipv6/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
172               }
173               description "the IPv6 U-plane transport marking as defined in o-ran-interfaces";
174             }
175           }
176         }
177       }
178     }
179     list ru-elements {
180       key "name";
181       description
182         "the list of transport definitions for each processing element";
183       leaf name {
184         type string {
185           length "1..255";
186         }
187         description
188           "A name that is unique across the O-RU that identifies a processing
189           element instance.
190
191           This name may be used in fault management to refer to a fault source
192           or affected object";
193       }
194       container transport-flow {
195         description
196           "container for the transport-flow used for CU plane";
197         leaf interface-name {
198           type leafref {
199             path "/if:interfaces/if:interface/if:name";
200           }
201           description "the interface name ";
202         }
203         container aliasmac-flow {
204           when "../../../transport-session-type = 'ALIASMAC-INTERFACE'";
205           if-feature o-ran-int:ALIASMAC-BASED-CU-PLANE;
206           description "leafs for virtual mac type data flows";
207           leaf ru-aliasmac-address {
208             type leafref {
209               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:alias-macs";
210             }
211             mandatory true;
212             description
213               "O-RU's alias MAC address used for alias MAC based flow";
214           }
215           leaf vlan-id {
216             type leafref {
217               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
218             }
219             description
220               "O-RU's VLAN-ID used for alias MAC based flow";
221           }
222           leaf o-du-mac-address {
223             type yang:mac-address;
224             mandatory true;
225             description
226               "O-DU's MAC address used for alias MAC based flow";
227           }
228         }
229         container eth-flow {
230           when "../../../transport-session-type = 'ETH-INTERFACE'";
231           description "leafs for mac + vlan-id type data flows";
232           leaf ru-mac-address {
233             type leafref {
234               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address";
235             }
236             mandatory true;
237             description
238               "O-RU's MAC address used for Ethernet based flow";
239           }
240           leaf vlan-id {
241             type leafref {
242               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
243             }
244             mandatory true;
245             description
246               "O-RU's VLAN-ID used for Ethernet based flow";
247           }
248           leaf o-du-mac-address {
249             type yang:mac-address;
250             mandatory true;
251             description
252               "O-DU's MAC address used for Ethernet based flow";
253           }
254         }
255         container udpip-flow {
256           when "../../../transport-session-type = 'UDPIP-INTERFACE'";
257           description "leafs for UDP/IP type data flows";
258           choice address {
259             leaf ru-ipv4-address {
260               type leafref {
261                 path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv4/ip:address/ip:ip";
262               }
263               description "O-RU's IPv4 address";
264             }
265             leaf ru-ipv6-address {
266               type leafref {
267                 path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv6/ip:address/ip:ip";
268               }
269               description "O-RU's IPv6 address";
270             }
271             mandatory true;
272             description "choice of O-RU IPv4 or IPv6 address";
273           }
274           leaf o-du-ip-address {
275             type inet:ip-address;
276             mandatory true;
277             description "O-DU's IPv address";
278           }
279           leaf ru-ephemeral-udp-port {
280             type inet:port-number;
281             mandatory true;
282             description
283               "ephemeral port used by O-RU";
284           }
285           leaf o-du-ephemeral-udp-port {
286             type inet:port-number;
287             mandatory true;
288             description
289               "ephemeral port used by O-DU";
290           }
291           leaf ecpri-destination-udp {
292             type inet:port-number;
293             mandatory true;
294             description "the well known UDP port number used by eCPRI";
295             // fixme - add in a default when allocated by IANA
296           }
297         }
298         container north-eth-flow {
299           when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'";
300           if-feature "SHARED_CELL";
301           description "leafs for mac + vlan-id type data flows";
302           leaf ru-mac-address {
303             type leafref {
304               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address";
305             }
306             description
307               "O-RU's MAC address used for Ethernet based flow";
308           }
309           leaf vlan-id {
310             type leafref {
311               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
312             }
313             description
314               "O-RU's VLAN-ID used for Ethernet based flow";
315           }
316           leaf north-node-mac-address {
317             type yang:mac-address;
318             description
319               "North-node's MAC address used for Ethernet based flow";
320           }
321         }
322         container south-eth-flow {
323           when "../../../transport-session-type = 'SHARED-CELL-ETH-INTERFACE'";
324           if-feature "SHARED_CELL";
325           description "leafs for mac + vlan-id type data flows";
326           leaf ru-mac-address {
327             type leafref {
328               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address";
329             }
330             description
331               "O-RU's MAC address used for Ethernet based flow";
332           }
333           leaf vlan-id {
334             type leafref {
335               path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
336             }
337             description
338               "O-RU's VLAN-ID used for Ethernet based flow";
339           }
340           leaf south-node-mac-address {
341             type yang:mac-address;
342             description
343               "south-node's MAC address used for Ethernet based flow";
344           }
345         }
346       }
347     }
348   }
349
350 // top level container
351
352   container processing-elements {
353     description
354       "a model defining the mapping between transport flows and arbitrary
355       O-RAN processing elements. A processing element may be then defined for
356       handling connectivity or delay procedures, or defined with a corresponding
357       eaxcid for CU plane operations";
358     uses pe-group;
359   }
360 }