Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-dhcp@2020-12-10.yang
1 module o-ran-dhcp {
2   yang-version 1.1;
3   namespace "urn:o-ran:dhcp:1.0";
4   prefix "o-ran-dhcp";
5
6   import ietf-interfaces {
7     prefix "if";
8   }
9
10   import ietf-inet-types {
11     prefix "inet";
12   }
13
14   import ietf-dhcpv6-types {
15     prefix dhcpv6-type;
16     revision-date 2018-09-04;
17   }
18
19   import o-ran-wg4-features {
20     prefix or-feat;
21   }
22
23   organization "O-RAN Alliance";
24
25   contact
26     "www.o-ran.org";
27
28   description
29     "This module defines the YANG definitions for managng the DHCP client.
30
31     Copyright 2019 the O-RAN alliance.
32
33     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
34     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
37     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
38     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
39     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
40     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
42     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
43     POSSIBILITY OF SUCH DAMAGE.
44
45     Redistribution and use in source and binary forms, with or without
46     modification, are permitted provided that the following conditions are met:
47
48     * Redistributions of source code must retain the above copyright notice,
49     this list of conditions and the above disclaimer.
50     * Redistributions in binary form must reproduce the above copyright notice,
51     this list of conditions and the above disclaimer in the documentation
52     and/or other materials provided with the distribution.
53     * Neither the Members of the O-RAN Alliance nor the names of its
54     contributors may be used to endorse or promote products derived from
55     this software without specific prior written permission.";
56
57   revision "2020-12-10" {
58    description
59      "version 5.0.0
60
61      1) added new leafs for reporting discovered event-collectors
62      used";
63
64    reference "ORAN-WG4.O1.0-v05.00";
65 //update reference
66   }
67
68   revision "2019-07-03" {
69     description
70       "version 1.1.0
71
72       1) backward compatible changes to fix pen number which always
73       should have been 32 bits
74       2) backward compatible changes to introduce reporting of 3GPP
75       discovered MV-PnP information, including CA/RA Servers and SeGW
76       3) backward compatible changes to introduce groupings";
77
78     reference "ORAN-WG4.M.0-v01.00";
79   }
80
81   revision "2019-02-04" {
82     description
83       "version 1.0.0
84
85       1) imported model from xRAN
86       2) changed namespace and reference from xran to o-ran";
87
88     reference "ORAN-WG4.M.0-v01.00";
89   }
90
91   typedef netconf-client-id {
92     type union {
93       type inet:ip-address;
94       type inet:uri;
95     }
96     description "A NETCONF client identifier";
97   }
98
99   typedef ca-ra-server-id {
100     type union {
101       type inet:ip-address;
102       type inet:uri;
103     }
104     description "A CA/RA Server identifier";
105   }
106
107   typedef segw-id {
108     type union {
109       type inet:ip-address;
110       type inet:uri;
111     }
112     description "A SeGW identifier";
113   }
114
115   typedef event-collector-id {
116     type union {
117       type inet:ip-address;
118       type inet:uri;
119     }
120     description "An event collector identifier";
121   }
122
123   grouping ca-ra-servers {
124     description
125       "The CA/RA servers discovered using DHCP, discovered using the 3GPP
126       defined options in 3GPP 32.509 in vendor specific option 43/17";
127     list ca-ra-servers {
128       key servers;
129       description "A list of IP addresses or URIs for CA/RA Servers";
130
131       leaf servers{
132         type ca-ra-server-id;
133         description "the server identifier";
134       }
135       leaf port-number {
136         type inet:port-number;
137         description "an optional (non-default) port";
138       }
139       leaf ca-ra-path {
140         type string;
141         description
142           "ASCII string representing the path to the CMP server directory.
143           A CMP server may be located in an arbitrary path other than root.";
144       }
145       leaf subject-name {
146         type string;
147         description
148           "ASCII string representing the subject name of the CA/RA. ";
149       }
150       leaf protocol {
151         type enumeration {
152           enum HTTP;
153           enum HTTPS;
154         }
155       }
156     }
157   }
158
159   grouping security-gateways {
160     description
161       "The security gateways discovered using DHCP, discovered using the 3GPP
162       defined options in 3GPP 32.509 in vendor specific option 43/17";
163     list segw {
164       key gateways;
165       description "A list of IP addresses or URIs for SeGW";
166
167       leaf gateways{
168         type segw-id;
169         description "the SeGW identifier";
170       }
171     }
172
173   }
174
175   grouping netconf-clients {
176     description
177       "The netconf clients discovered using DHCP, discovered using the IANA
178       defined options or O-RAN defined syntax for encoding IP adresses or FQDNs
179       in vendor specific option 43/17";
180     list netconf-clients{
181       key client;
182       description "A list of IP addresses or URIs for NETCONF clients";
183       leaf client{
184         type netconf-client-id;
185         description "the client identifier";
186       }
187       leaf optional-port {
188         type inet:port-number;
189         description "an optional (non-default) port";
190       }
191     }
192   }
193
194   grouping event-collectors {
195     description
196       "The event-collectors discovered using DHCP, discovered using the O-RAN
197       defined syntax for encoding IP adresses or FQDNs in vendor specific
198       option 43/17";
199     leaf-list event-collectors{
200       if-feature "or-feat:NON-PERSISTENT-MPLANE";
201       max-elements 1;
202       type event-collector-id;
203       description
204         "An event-collector discovered using DHCP that can be used by the O-RU to
205         send pnfRegistration notification messages.
206
207         The O-RU behaviour when discovering more than one event-collector is not defined.";
208     }
209     leaf event-collector-format{
210       if-feature "or-feat:NON-PERSISTENT-MPLANE";
211       type enumeration {
212         enum ONAP;
213       }
214       description "the event-collector notification format";
215     }
216   }
217
218   grouping dhcpv4-option {
219     description "DHCPv4 Configuration options";
220
221     leaf dhcp-server-identifier {
222       type  inet:ip-address;
223       description "DHCP server identifier";
224     }
225     leaf domain-name {
226       type  string;
227       description "Name of the domain";
228     }
229     leaf-list domain-name-servers {
230       type  inet:ip-address;
231       description "A list of DNS servers";
232     }
233     leaf interface-mtu {
234       type  uint32 {
235         range "0..65535";
236       }
237       description "Minimum Transmission Unit (MTU) of the interface";
238     }
239     leaf-list default-gateways{
240       type inet:ip-address;
241       description "the list of default gateways on the O-RUs subnet";
242     }
243     uses netconf-clients;
244     uses ca-ra-servers;
245     uses security-gateways;
246     uses event-collectors;
247   }
248
249   grouping dhcpv6-option {
250     description "DHCPv6 Configuration options";
251
252     container dhcp-server-identifier{
253       description "dhcpv6 server identifief";
254       uses dhcpv6-type:duid;
255     }
256     leaf domain-name {
257       type  string;
258       description "Name of the domain";
259     }
260     leaf-list domain-name-servers {
261       type  inet:ip-address;
262       description "A list of DNS servers";
263     }
264     uses netconf-clients;
265     uses ca-ra-servers;
266     uses security-gateways;
267     uses event-collectors;
268   }
269
270   grouping dhcp-group {
271     list interfaces {
272       key "interface";
273       description "Interface configuration";
274
275       leaf interface {
276         type if:interface-ref;
277         description "Name of the interface";
278       }
279
280       container dhcpv4 {
281         description "DHCPv4 information";
282         leaf client-id {
283           type string;
284           description "DHCP client identifier";
285         }
286         uses dhcpv4-option;
287       }
288       container dhcpv6 {
289         description "DHCPv6 information";
290         container dhcp-client-identifier{
291           description "dhcpv6 client identifief";
292           uses dhcpv6-type:duid;
293         }
294         uses dhcpv6-option;
295       }
296     }
297
298     container m-plane-dhcp {
299       description "leafs covering off DHCP aspects of m-plane operations";
300       leaf private-enterprise-number {
301         status deprecated;
302         type uint16;
303         default 53148;
304         description "the private enteprise number allocated to O-RAN Alliance";
305       }
306       leaf private-enterprise-num {
307         type uint32;
308         default 53148;
309         description "the private enterprise number allocated to O-RAN Alliance";
310       }
311       leaf vendor-class-data {
312         type string;
313         description
314           "The string used in DHCPv4 option 60 or DHCPv4 option 124 and
315           DHCPv6 option 16";
316       }
317     }
318   }
319
320
321   // Top Level Container
322
323   container dhcp {
324     config false;
325     description
326       "DHCP client configuration";
327
328     uses dhcp-group;
329   }
330 }