Configurable HTTP(S) support for VES messaging
[sim/o1-interface.git] / ntsimulator / deploy / x-ran / yang / xran-processing-element.yang
1 module xran-processing-element {
2   yang-version 1.1;
3   namespace "urn:xran:processing-element:1.0";
4   prefix "xran-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 xran-interfaces {
23     prefix "xran-int";
24   }
25
26   organization "xRAN Forum";
27
28   contact
29     "www.xran.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 2018 the xRAN Forum.
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 xRAN Forum 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 "2018-07-20" {
65     description
66       "version 1.0.0 - First release of the xRAN YANG M-Plane models.
67
68       This version of the model supports v01.00 of the corrsponding xRAN
69       M-Plane Specification.";
70     reference "XRAN-FH.MP.0-v01.00";
71   }
72
73   identity XRAN-INTERFACE-TYPE {
74     base if:interface-type;
75     description
76       "This identity is used as a base for all interface types
77        defined by xRAN.";
78   }
79
80   identity ALIASMAC-INTERFACE {
81     base XRAN-INTERFACE-TYPE;
82     description
83       "Identity type for alias MAC based CU plane interface,
84       whwere multiple MAC addresses are used on the same Ethernet interface. ";
85   }
86
87   identity ETH-INTERFACE {
88     base XRAN-INTERFACE-TYPE;
89     description
90       "identity type for ethernet plus vlan based CU plane interface. ";
91   }
92
93   identity UDPIP-INTERFACE {
94     base XRAN-INTERFACE-TYPE;
95     description
96       "identity type for UDP/IP based CU plane interface. ";
97   }
98
99   container processing-elements {
100     description
101       "a model defining the mapping between transport flows and arbitrary
102       xRAN processing elements. A processing element may be then defined for
103       handling connectivity or delay procedures, or defined with a corresponding
104       eaxcid for CU plane operations";
105     leaf transport-session-type {
106       type identityref {
107         base XRAN-INTERFACE-TYPE;
108       }
109       description
110         "the type of transport session used for identifying different processing
111         elements";
112     }
113     list ru-elements {
114       key "name";
115       description
116         "the list of transport definitions for each processing element";
117       leaf name {
118         type string {
119           length "1..255";
120         }
121         description
122           "A name that is unique across the RU that identifies a processing
123           element instance.
124
125           This name may be used in fault management to refer to a fault source
126           or affected object";
127       }
128       container transport-flow {
129         description
130           "container for the transport-flow used for CU plane";
131         leaf interface-name {
132           type leafref {
133             path "/if:interfaces/if:interface/if:name";
134           }
135           description "the interface name ";
136         }
137         container aliasmac-flow {
138           when "derived-from(../../../transport-session-type, 'ALIASMAC-INTERFACE')";
139           //checkAL added presence
140           presence "contains aliasmac details";
141           if-feature xran-int:ALIASMAC-BASED-CU-PLANE;
142           description "leafs for virtual mac type data flows";
143           leaf ru-aliasmac-address {
144             type leafref {
145               //checkAL added prefix to interface-name
146               path "/if:interfaces/if:interface[if:name = current()/../../xran-elements:interface-name]/xran-int:alias-macs";
147             }
148             config false;
149             mandatory true;
150             description
151               "RU's alias MAC address used for alias MAC based flow";
152           }
153           leaf vlan-id {
154             type leafref {
155               //checkAL added prefix to interface-name
156               path "/if:interfaces/if:interface[if:name = current()/../../xran-elements:interface-name]/xran-int:vlan-id";
157             }
158             description
159               "RU's VLAN-ID used for alias MAC based flow";
160           }
161           leaf llscu-mac-address {
162             type yang:mac-address;
163             mandatory true;
164             description
165               "lls-CU's MAC address used for alias MAC based flow";
166           }
167         }
168         container eth-flow {
169           when "derived-from(../../../transport-session-type, 'ETH-INTERFACE')";
170           //checkAL added presence
171           presence "contains eth details";
172           description "leafs for mac + vlan-id type data flows";
173           leaf ru-mac-address {
174             type leafref {
175               //checkAL added prefix to interface-name
176               path "/if:interfaces/if:interface[if:name = current()/../../xran-elements:interface-name]/xran-int:mac-address";
177             }
178             mandatory true;
179             description
180               "RU's MAC address used for Ethernet based flow";
181           }
182           leaf vlan-id {
183             type leafref {
184               //checkAL added prefix to interface-name
185               path "/if:interfaces/if:interface[if:name = current()/../../xran-elements:interface-name]/xran-int:vlan-id";
186             }
187             mandatory true;
188             description
189               "RU's VLAN-ID used for Ethernet based flow";
190           }
191           leaf llscu-mac-address {
192             type yang:mac-address;
193             mandatory true;
194             description
195               "lls-CU's MAC address used for alias MAC based flow";
196           }
197         }
198         container udpip-flow {
199           when "derived-from(../../../transport-session-type, 'UDPIP-INTERFACE')";
200           //checkAL added presence
201           presence "contains updip details";
202           if-feature xran-int:UDPIP-BASED-CU-PLANE;
203           description "leafs for UDP/IP type data flows";
204           choice address {
205             leaf ru-ipv4-address {
206               type leafref {
207                 //checkAL added prefix to interface-name
208                 path "/if:interfaces/if:interface[if:name = current()/../../xran-elements:interface-name]/ip:ipv4/ip:address/ip:ip";
209               }
210               description "RU's IPv4 address";
211             }
212             leaf ru-ipv6-address {
213               type leafref {
214                 //checkAL added prefix to interface-name
215                 path "/if:interfaces/if:interface[if:name = current()/../../xran-elements:interface-name]/ip:ipv6/ip:address/ip:ip";
216               }
217               description "RU's IPv6 address";
218             }
219             mandatory true;
220             description "choice of RU IPv4 or IPv6 address";
221           }
222           leaf llscu-ip-address {
223             type inet:ip-address;
224             mandatory true;
225             description "lls-CU's IPv address";
226           }
227           leaf ru-ephemeral-udp-port {
228             type inet:port-number;
229             mandatory true;
230             description
231               "ephemeral port used by RU";
232           }
233           leaf llscu-ephemeral-udp-port {
234             type inet:port-number;
235             mandatory true;
236             description
237               "ephemeral port used by lls-CU";
238           }
239           leaf destination-udp {
240             type inet:port-number;
241             mandatory true;
242             description "the well known UDP port number used by eCPRI";
243             // fixme - add in a default when allocated by IANA
244           }
245         }
246       }
247     }
248   }
249 }