Add supoprt for D release use-case.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / o-ran-operations@2020-12-10.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 2019 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 "2020-12-10" {
59     description
60       "version 5.0.0
61
62       1) added pnfRegistration and VES header version fields";
63
64     reference "ORAN-WG4.M.0-v05.00";
65   }
66
67   revision "2019-07-03" {
68     description
69       "version 2.0.0
70
71       1) added timezone-name
72       2) added ru-instance-id
73       3) backward compatible changes to introduce groupings.";
74
75     reference "ORAN-WG4.M.0-v01.00";
76   }
77
78   revision "2019-02-04" {
79     description
80       "version 1.0.0
81
82       1) imported model from xRAN
83       2) changed namespace and reference from xran to o-ran";
84
85     reference "ORAN-WG4.M.0-v01.00";
86   }
87
88
89   typedef timezone-name {
90     type string;
91     description
92       "A time zone name as used by the Time Zone Database,
93       sometimes referred to as the 'Olson Database'.
94
95       The complete set of valid values is defined in
96       https://www.iana.org/time-zones.
97
98       The exact set of supported values is an
99       implementation-specific matter.";
100
101     reference
102       "RFC 6557: Procedures for Maintaining the Time Zone Database
103       IANA Time Zone Database https://www.iana.org/time-zones ";
104   }
105
106   typedef version {
107     type string {
108       pattern '[0-9]+(\.[0-9]+){1,2}';
109     }
110     description
111       "this type definition is used to represent the version of the WG4
112       fronthaul interface.";
113   }
114
115   grouping operational-group {
116
117 // Container used for WG4 specific declarations
118     container declarations {
119       //FIXME - determine whether it is acceptable to WG4 to change this to a presence
120       //container, where the presence indicates the NETCONF server supports WG4
121       //defined functionality
122       config false;
123       description "WG4 Specific Declarations of supported version of standards";
124
125       leaf ru-instance-id {
126         type string;
127         must "re-match(current(), concat(/hw:hardware/hw:component/hw:mfg-name,
128           '_', /hw:hardware/hw:component/hw:model-name, '_',
129           /hw:hardware/hw:component/hw:serial-num ))";
130         description
131           "a unique instance identifier that may be used to identify a
132           particular hardware instance, e.g., when used performing hierarchical
133           management via the O-DU.";
134       }
135
136       leaf supported-mplane-version {
137         type version;
138         default "1.0.0";
139         description "Parameter provides highest M-Plane specification version device is compliant with.";
140       }
141
142       leaf supported-cusplane-version {
143         type version;
144         default "1.0.0";
145         description "Parameter provides highest CUS-Plane specification version device is compliant with.";
146       }
147
148       list supported-header-mechanism {
149         description "list provides information regarding type and version of headers.";
150         key protocol;
151
152         leaf protocol {
153           type enumeration {
154             enum ECPRI {
155               description
156                 "Indicates that an O-RU supports the ecpri header format
157                 for the C/U plane";
158             }
159             enum IEEE-1914-3 {
160               description
161                 "Indicates that an O-RU supports the 1914.3 header format
162                 for the C/U plane";
163             }
164           }
165           description "Transport protocol type.";
166         }
167
168         leaf ecpri-concatenation-support {
169           when "../protocol = 'ECPRI'";
170           type boolean;
171           default false;
172           description
173             "This leaf is used to indicate whether the O-RU supports the optional
174             eCPRI concatenation capability";
175         }
176
177         leaf protocol-version {
178           type version;
179           default "1.0";
180           description "Header protocol version.";
181         }
182       }
183       leaf supported-common-event-header-version {
184         if-feature "or-feat:NON-PERSISTENT-MPLANE";
185         type version;
186         description "Parameter provides highest commonEventheader version device is compliant with.";
187       }
188       leaf supported-ves-event-listener-version {
189         if-feature "or-feat:NON-PERSISTENT-MPLANE";
190         type version;
191         description "Parameter provides highest vesEventListener version device is compliant with.";
192       }
193       leaf supported-pnf-registration-fields-version {
194         if-feature "or-feat:NON-PERSISTENT-MPLANE";
195         type version;
196         description "Parameter provides highest pnfRegistrationFields version device is compliant with.";
197       }
198     }
199
200     container operational-state {
201       config false;
202       description
203         "Operational state for the O-RAN network element";
204       leaf restart-cause {
205         type enumeration {
206           enum POWER-ON {
207             description
208               "Equipment restarted because it was powered on";
209           }
210           enum SUPERVISION-WATCHDOG {
211             description
212               "Equipment restarted because it's supervision wathcdog timer wasn't reset
213               by a NETCONF client (inferring loss of NETCONF connectivity)";
214           }
215           enum MPLANE-TRIGGERED-RESTART {
216             description
217               "Equipment restarted because of an M-plane issued  rpc";
218           }
219           enum SOFTWARE-FAILURE {
220             description
221               "Equipment restarted because of software failure";
222           }
223           enum OTHER-WATCHDOG-TIMER {
224             description
225               "Equipment restarted because of some other non NETCONF watchdog timer";
226           }
227           enum UNKNOWN {
228             description
229               "The restart reason for the Equipment is unknown";
230           }
231         }
232         description "the cause for the last restart of the O-RAN Network Element";
233       }
234       leaf restart-datetime {
235         type yang:date-and-time;
236         description
237           "The system date and time when the system last restarted.";
238       }
239     }
240
241
242 // Common cross-WG container used for configuring clock and call home timers
243     container clock {
244       description
245         "System date and time properties used by all working groups.";
246
247       leaf timezone-name {
248         type timezone-name;
249         description
250           "An optional TZ database name to use for the system,
251            such as 'Europe/Stockholm'
252
253            Time zone name is an informative leaf and is NOT used in the
254            managed element to convert local time zone.
255
256            The managed element may include time zone name in measurement or
257            fault data.";
258       }
259
260       leaf timezone-utc-offset {
261         type int16 {
262           range "-720 .. 840";
263         }
264         units "minutes";
265         default 0;
266         description
267           "The number of minutes to add to UTC time to
268           identify the time zone for this system.  For example,
269           'UTC - 8:00 hours' would be represented as '-480'.";
270       }
271     }
272
273     leaf re-call-home-no-ssh-timer {
274       type uint16;
275       units seconds;
276       default 60;
277       description
278         "A common timer used by the O-RAN equipment to trigger the repeated call
279         home procedure to all identified call home servers to which the O-RAN
280         equipment has not already an established SSH connection.
281
282         A value of 0 means that the O-RAN equipment shall disable operation
283         of the timer triggered NETCONF call home procedure.";
284     }
285   }
286
287 // Top level container
288
289   container operational-info{
290     description
291       "a collection of operational infor for the O-RU";
292     uses operational-group;
293
294   }
295
296 // RPCs
297
298   rpc reset {
299     nacm:default-deny-all;
300     description
301       "Management plane triggered restart of the radio unit.
302        A server SHOULD send an rpc reply to the client before
303        restarting the system.";
304
305   }
306 }