Support of WG4 OpenFronthaul Management-Plane VES
[scp/oam/modeling.git] / data-model / yang / published / o-ran / ru-fh / o-ran-operations@2022-08-15.yang
1 module o-ran-operations {
2   yang-version 1.1;
3   namespace "urn:o-ran:operations:1.0";
4   prefix "o-ran-ops";
5
6   import ietf-yang-types {
7     prefix yang;
8   }
9
10   import ietf-netconf-acm {
11     prefix nacm;
12     reference
13       "RFC 8341: Network Configuration Access Control Model";
14   }
15
16   import ietf-hardware {
17     prefix hw;
18   }
19
20   import o-ran-wg4-features {
21     prefix or-feat;
22   }
23
24   organization "O-RAN Alliance";
25
26   contact
27     "www.o-ran.org";
28
29   description
30     "This module defines the YANG model used for O-RAN operations.
31
32     Copyright 2021 the O-RAN Alliance.
33
34     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
35     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
37     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
38     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
41     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
43     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
44     POSSIBILITY OF SUCH DAMAGE.
45
46     Redistribution and use in source and binary forms, with or without
47     modification, are permitted provided that the following conditions are met:
48
49     * Redistributions of source code must retain the above copyright notice,
50     this list of conditions and the above disclaimer.
51     * Redistributions in binary form must reproduce the above copyright notice,
52     this list of conditions and the above disclaimer in the documentation
53     and/or other materials provided with the distribution.
54     * Neither the Members of the O-RAN Alliance nor the names of its
55     contributors may be used to endorse or promote products derived from
56     this software without specific prior written permission.";
57
58   revision "2022-08-15" {
59     description
60       "version 10.0.0
61
62       1) added current-datetime leaf";
63
64     reference "ORAN-WG4.M.0-v10.00";
65   }
66
67   revision "2021-12-01" {
68     description
69       "version 8.0.0
70
71       1) typographical corrections in descriptions
72       2) new schema node maximum-simultaneous-netconf-sessions";
73
74     reference "ORAN-WG4.M.0-v08.00";
75   }
76
77   revision "2021-07-26" {
78     description
79       "version 7.0.0
80
81       1) new leaf for max-call-home-attempts";
82
83     reference "ORAN-WG4.M.0-v07.00";
84   }
85
86   revision "2021-03-22" {
87     description
88       "version 6.0.0
89
90       1) typographical corrections in descriptions.
91       2) new descriptions for NETCONF/TLS call home";
92
93     reference "ORAN-WG4.M.0-v06.00";
94   }
95
96   revision "2020-12-10" {
97     description
98       "version 5.0.0
99
100       1) added pnfRegistration and VES header version fields";
101
102     reference "ORAN-WG4.M.0-v05.00";
103   }
104
105   revision "2019-07-03" {
106     description
107       "version 2.0.0
108
109       1) added timezone-name
110       2) added ru-instance-id
111       3) backward compatible changes to introduce groupings.";
112
113     reference "ORAN-WG4.M.0-v01.00";
114   }
115
116   revision "2019-02-04" {
117     description
118       "version 1.0.0
119
120       1) imported model from xRAN
121       2) changed namespace and reference from xran to o-ran";
122
123     reference "ORAN-WG4.M.0-v01.00";
124   }
125
126
127   typedef timezone-name {
128     type string;
129     description
130       "A time zone name as used by the Time Zone Database,
131       sometimes referred to as the 'Olson Database'.
132
133       The complete set of valid values is defined in
134       https://www.iana.org/time-zones.
135
136       The exact set of supported values is an
137       implementation-specific matter.";
138
139     reference
140       "RFC 6557: Procedures for Maintaining the Time Zone Database
141       IANA Time Zone Database https://www.iana.org/time-zones ";
142   }
143
144   typedef version {
145     type string {
146       pattern '[0-9]+(\.[0-9]+){1,2}';
147     }
148     description
149       "this type definition is used to represent the version of the WG4
150       fronthaul interface.";
151   }
152
153   grouping operational-group {
154     description "operational grouping";
155
156 // Container used for WG4 specific declarations
157     container declarations {
158       //FIXME - determine whether it is acceptable to WG4 to change this to a presence
159       //container, where the presence indicates the NETCONF server supports WG4
160       //defined functionality
161       config false;
162       description "WG4 Specific Declarations of supported version of standards";
163
164       leaf ru-instance-id {
165         type string;
166         must "re-match(current(), concat(/hw:hardware/hw:component/hw:mfg-name,
167           '_', /hw:hardware/hw:component/hw:model-name, '_',
168           /hw:hardware/hw:component/hw:serial-num ))";
169         description
170           "a unique instance identifier that may be used to identify a
171           particular hardware instance, e.g., when used performing hierarchical
172           management via the O-DU.";
173       }
174
175       leaf supported-mplane-version {
176         type version;
177         default "1.0.0";
178         description "Parameter provides highest M-Plane specification version device is compliant with.";
179       }
180
181       leaf supported-cusplane-version {
182         type version;
183         default "1.0.0";
184         description "Parameter provides highest CUS-Plane specification version device is compliant with.";
185       }
186
187       list supported-header-mechanism {
188         key protocol;
189         description "list provides information regarding type and version of headers.";
190
191         leaf protocol {
192           type enumeration {
193             enum ECPRI {
194               description
195                 "Indicates that an O-RU supports the eCPRI header format
196                 for the C/U plane";
197             }
198             enum IEEE-1914-3 {
199               description
200                 "Indicates that an O-RU supports the 1914.3 header format
201                 for the C/U plane";
202             }
203           }
204           description "Transport protocol type.";
205         }
206
207         leaf ecpri-concatenation-support {
208           when "../protocol = 'ECPRI'";
209           type boolean;
210           default false;
211           description
212             "This leaf is used to indicate whether the O-RU supports the optional
213             eCPRI concatenation capability";
214         }
215
216         leaf protocol-version {
217           type version;
218           default "1.0";
219           description "Header protocol version.";
220         }
221       }
222       leaf supported-common-event-header-version {
223         if-feature "or-feat:NON-PERSISTENT-MPLANE";
224         type version;
225         description "Parameter provides highest commonEventheader version device is compliant with.";
226       }
227       leaf supported-ves-event-listener-version {
228         if-feature "or-feat:NON-PERSISTENT-MPLANE";
229         type version;
230         description "Parameter provides highest vesEventListener version device is compliant with.";
231       }
232       leaf supported-pnf-registration-fields-version {
233         if-feature "or-feat:NON-PERSISTENT-MPLANE";
234         type version;
235         description "Parameter provides highest pnfRegistrationFields version device is compliant with.";
236       }
237       leaf maximum-simultaneous-netconf-sessions {
238         type uint8 {
239           range "2..max";
240         }
241         default 2;
242         description
243           "The maximum number of simultaneous NETCONF sessions able to be supported by the O-RU";
244       }
245     }
246
247     container operational-state {
248       config false;
249       description
250         "Operational state for the O-RAN network element";
251       leaf restart-cause {
252         type enumeration {
253           enum POWER-ON {
254             description
255               "Equipment restarted because it was powered on";
256           }
257           enum SUPERVISION-WATCHDOG {
258             description
259               "Equipment restarted because it's supervision watchdog timer wasn't reset
260               by a NETCONF client (inferring loss of NETCONF connectivity)";
261           }
262           enum MPLANE-TRIGGERED-RESTART {
263             description
264               "Equipment restarted because of an M-plane issued RPC";
265           }
266           enum SOFTWARE-FAILURE {
267             description
268               "Equipment restarted because of software failure";
269           }
270           enum OTHER-WATCHDOG-TIMER {
271             description
272               "Equipment restarted because of some other non NETCONF watchdog timer";
273           }
274           enum UNKNOWN {
275             description
276               "The restart reason for the Equipment is unknown";
277           }
278         }
279         description "the cause for the last restart of the O-RAN Network Element";
280       }
281       leaf restart-datetime {
282         type yang:date-and-time;
283         description
284           "The system date and time when the system last restarted.";
285       }
286       leaf current-datetime {
287         type yang:date-and-time;
288         description
289           "An optional leaf to enable the O-RU to report its current system date and time.
290
291           O-RUs that support a realtime clock may use it to set its current-datetime.
292           O-RUs that support GNSS may use GNSS derived time to set its current-datetime.
293           Other O-RUs can set the current-datetime from PTP synchronization.
294
295           An O-RU may ommit the leaf if its current-datetime is not set, e.g., using one
296           of the examples listed above.";
297       }
298     }
299
300
301 // Common cross-WG container used for configuring clock and call home timers
302     container clock {
303       description
304         "System date and time properties used by all working groups.";
305
306       leaf timezone-name {
307         type timezone-name;
308         description
309           "An optional TZ database name to use for the system,
310            such as 'Europe/Stockholm'
311
312            Time zone name is an informative leaf and is NOT used in the
313            managed element to convert local time zone.
314
315            The managed element may include time zone name in measurement or
316            fault data.";
317       }
318
319       leaf timezone-utc-offset {
320         type int16 {
321           range "-720 .. 840";
322         }
323         units "minutes";
324         default 0;
325         description
326           "The number of minutes to add to UTC time to
327           identify the time zone for this system.  For example,
328           'UTC - 8:00 hours' would be represented as '-480'.";
329       }
330     }
331
332     leaf re-call-home-no-ssh-timer {
333       type uint16;
334       units seconds;
335       default 60;
336       description
337         "A common timer used by the O-RAN equipment to trigger the repeated call
338         home procedure to all identified call home servers to which the O-RAN
339         equipment has not already an established NETCONF connection.
340
341         Irrespective of the name of the leaf, the timer applies eaqually to
342         call home procedures using NETCONF/SSH and those using NETCONF/TLS.
343
344         A value of 0 means that the O-RAN equipment shall disable operation
345         of the timer triggered NETCONF call home procedure.";
346     }
347
348     leaf max-call-home-attempts {
349       type uint8 {
350         range "0 .. 20";
351       }
352       description
353         "A counter to repeat Call Home procedures.
354         Note: In case counter is set with value zero
355         O-RU shall not repeat Call Home procedure";
356     }
357   }
358
359 // Top level container
360
361   container operational-info{
362     description
363       "a collection of operational information for the O-RU";
364     uses operational-group;
365
366   }
367
368 // RPCs
369
370   rpc reset {
371     nacm:default-deny-all;
372     description
373       "Management plane triggered restart of the radio unit.
374        A server SHOULD send an rpc reply to the client before
375        restarting the system.";
376
377   }
378 }