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