Configurable HTTP(S) support for VES messaging
[sim/o1-interface.git] / ntsimulator / deploy / o-ran / yang / o-ran-processing-element.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 2019 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 "2019-07-03" {
65     description
66       "version 1.1.0
67
68       1) added new leaf to enable O-RU to report the maximum number of
69       transport flows it can support, e.g., due to restrictions on number
70       of VLAN-IDs when ethernet type transport is used.";
71
72     reference "ORAN-WG4.M.0-v01.00";
73   }
74   revision "2019-02-04" {
75     description
76       "version 1.0.0
77
78       1) imported model from xRAN
79       2) changed namespace and reference from xran to o-ran";
80
81     reference "ORAN-WG4.M.0-v01.00";
82   }
83
84 // groupings
85
86   grouping pe-group {
87     leaf maximum-number-of-transport-flows {
88       type uint16 {
89         range "1..4094";
90       }
91       config false;
92       default 4094;
93       description
94         "The maximum number of transport flows that can be supported by an O-RU";
95     }
96     leaf transport-session-type {
97       type enumeration {
98         enum ETH-INTERFACE {
99           description "VLAN based CUS Transport ";
100         }
101         enum UDPIP-INTERFACE {
102           description "UDP/IP based CUS Transport ";
103         }
104         enum ALIASMAC-INTERFACE{
105           description "Alias MAC address based CUS Transport ";
106         }
107       }
108       default ETH-INTERFACE;
109       description
110         "the type of transport session used for identifying different processing
111         elements";
112     }
113     container enhanced-uplane-mapping {
114       presence "indicates that enhanced uplane mapping is used";
115       description "a mapping table for enhanced user plane marking";
116       list uplane-mapping {
117         key "up-marking-name";
118         description
119           "a mapping between up-link name and o-ran-interfaces:up-marking-name";
120         leaf up-marking-name {
121           type string;
122           description "a unique up marking name that is used for enhanced up marking";
123         }
124         choice up-markings {
125           description
126             "U-Plane markings";
127           case ethernet {
128             when "(../../transport-session-type = 'ALIASMAC-INTERFACE') or
129             (../../transport-session-type = 'ETH-INTERFACE')";
130             leaf up-cos-name {
131               type leafref {
132                 path "/if:interfaces/if:interface/o-ran-int:class-of-service/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
133               }
134               description "the Ethernet U-plane transport marking as defined in o-ran-interfaces";
135             }
136           }
137           case ipv4 {
138             when "(../../transport-session-type = 'UDPIP-INTERFACE')";
139             leaf upv4-dscp-name {
140               type leafref {
141                 path "/if:interfaces/if:interface/ip:ipv4/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
142               }
143               description "the IPv4 U-plane transport marking as defined in o-ran-interfaces";
144             }
145           }
146           case ipv6 {
147             when "(../../transport-session-type = 'UDPIP-INTERFACE')";
148             leaf upv6-dscp-name {
149               type leafref {
150                 path "/if:interfaces/if:interface/ip:ipv6/o-ran-int:diffserv-markings/o-ran-int:enhanced-uplane-markings/o-ran-int:up-marking-name";
151               }
152               description "the IPv6 U-plane transport marking as defined in o-ran-interfaces";
153             }
154           }
155         }
156       }
157     }
158     list ru-elements {
159       key "name";
160       description
161         "the list of transport definitions for each processing element";
162       leaf name {
163         type string {
164           length "1..255";
165         }
166         description
167           "A name that is unique across the O-RU that identifies a processing
168           element instance.
169
170           This name may be used in fault management to refer to a fault source
171           or affected object";
172       }
173       container transport-flow {
174         description
175           "container for the transport-flow used for CU plane";
176         leaf interface-name {
177           type leafref {
178             path "/if:interfaces/if:interface/if:name";
179           }
180           description "the interface name ";
181         }
182         container aliasmac-flow {
183           when "../../../transport-session-type = 'ALIASMAC-INTERFACE'";          
184           if-feature o-ran-int:ALIASMAC-BASED-CU-PLANE;
185           //checkAS add presence, because it has mandatory child
186           presence "Contains AliasMAC details.";
187           description "leafs for virtual mac type data flows";
188           leaf ru-aliasmac-address {
189             type leafref {
190               //checkAL added o-ran-elements:  before interface-name
191               path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:alias-macs";
192             }
193             mandatory true;
194             description
195               "O-RU's alias MAC address used for alias MAC based flow";
196           }
197           leaf vlan-id {
198             type leafref {
199               //checkAL added o-ran-elements:  before interface-name
200               path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:vlan-id";
201             }
202             description
203               "O-RU's VLAN-ID used for alias MAC based flow";
204           }
205           leaf o-du-mac-address {
206             type yang:mac-address;
207             mandatory true;
208             description
209               "O-DU's MAC address used for alias MAC based flow";
210           }
211         }
212         container eth-flow {
213           when "../../../transport-session-type = 'ETH-INTERFACE'";
214           //checkAS add presence, because it has mandatory child
215           presence "Contains ETH details.";
216           description "leafs for mac + vlan-id type data flows";
217           leaf ru-mac-address {
218             type leafref {
219               //checkAL added o-ran-elements:  before interface-name
220               path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:mac-address";
221             }
222             mandatory true;
223             description
224               "O-RU's MAC address used for Ethernet based flow";
225           }
226           leaf vlan-id {
227             type leafref {
228               //checkAL added o-ran-elements:  before interface-name
229               path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:vlan-id";
230             }
231             mandatory true;
232             description
233               "O-RU's VLAN-ID used for Ethernet based flow";
234           }
235           leaf o-du-mac-address {
236             type yang:mac-address;
237             mandatory true;
238             description
239               "O-DU's MAC address used for Ethernet based flow";
240           }
241         }
242         container udpip-flow {
243           when "../../../transport-session-type = 'UDPIP-INTERFACE'";
244           //checkAL added presence
245           presence "contains updip details";
246           description "leafs for UDP/IP type data flows";
247           choice address {
248             leaf ru-ipv4-address {
249               type leafref {
250                 //checkAL added o-ran-elements:  before interface-name
251                 path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/ip:ipv4/ip:address/ip:ip";
252               }
253               description "O-RU's IPv4 address";
254             }
255             leaf ru-ipv6-address {
256               type leafref {
257                 //checkAL added o-ran-elements:  before interface-name
258                 path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/ip:ipv6/ip:address/ip:ip";
259               }
260               description "O-RU's IPv6 address";
261             }
262             mandatory true;
263             description "choice of O-RU IPv4 or IPv6 address";
264           }
265           leaf o-du-ip-address {
266             type inet:ip-address;
267             mandatory true;
268             description "O-DU's IPv address";
269           }
270           leaf ru-ephemeral-udp-port {
271             type inet:port-number;
272             mandatory true;
273             description
274               "ephemeral port used by O-RU";
275           }
276           leaf o-du-ephemeral-udp-port {
277             type inet:port-number;
278             mandatory true;
279             description
280               "ephemeral port used by O-DU";
281           }
282           leaf ecpri-destination-udp {
283             type inet:port-number;
284             mandatory true;
285             description "the well known UDP port number used by eCPRI";
286             // fixme - add in a default when allocated by IANA
287           }
288         }
289       }
290     }
291   }
292
293 // top level container
294
295   container processing-elements {
296     description
297       "a model defining the mapping between transport flows and arbitrary
298       O-RAN processing elements. A processing element may be then defined for
299       handling connectivity or delay procedures, or defined with a corresponding
300       eaxcid for CU plane operations";
301     uses pe-group;
302   }
303 }