Bug fix.
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / o-ran-operations.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   organization "O-RAN Alliance";
21
22   contact
23     "www.o-ran.org";
24
25   description
26     "This module defines the YANG model used for O-RAN operations.
27
28     Copyright 2019 the O-RAN Alliance.
29
30     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
31     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
34     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40     POSSIBILITY OF SUCH DAMAGE.
41
42     Redistribution and use in source and binary forms, with or without
43     modification, are permitted provided that the following conditions are met:
44
45     * Redistributions of source code must retain the above copyright notice,
46     this list of conditions and the above disclaimer.
47     * Redistributions in binary form must reproduce the above copyright notice,
48     this list of conditions and the above disclaimer in the documentation
49     and/or other materials provided with the distribution.
50     * Neither the Members of the O-RAN Alliance nor the names of its
51     contributors may be used to endorse or promote products derived from
52     this software without specific prior written permission.";
53
54   revision "2019-07-03" {
55     description
56       "version 2.0.0
57
58       1) added timezone-name
59       2) added ru-instance-id
60       3) backward compatible changes to introduce groupings.";
61
62     reference "ORAN-WG4.M.0-v01.00";
63   }
64
65   revision "2019-02-04" {
66     description
67       "version 1.0.0
68
69       1) imported model from xRAN
70       2) changed namespace and reference from xran to o-ran";
71
72     reference "ORAN-WG4.M.0-v01.00";
73   }
74
75
76   typedef timezone-name {
77     type string;
78     description
79       "A time zone name as used by the Time Zone Database,
80       sometimes referred to as the 'Olson Database'.
81
82       The complete set of valid values is defined in
83       https://www.iana.org/time-zones.
84
85       The exact set of supported values is an
86       implementation-specific matter.";
87
88     reference
89       "RFC 6557: Procedures for Maintaining the Time Zone Database
90       IANA Time Zone Database https://www.iana.org/time-zones ";
91   }
92
93   typedef version {
94     type string {
95       pattern '[0-9]+(\.[0-9]+){1,2}';
96     }
97     description
98       "this type definition is used to represent the version of the WG4
99       fronthaul interface.";
100   }
101
102   grouping operational-group {
103
104 // Container used for WG4 specific declarations
105     container declarations {
106       //FIXME - determine whether it is acceptable to WG4 to change this to a presence
107       //container, where the presence indicates the NETCONF server supports WG4
108       //defined functionality
109       config false;
110       description "WG4 Specific Declarations of supported version of standards";
111
112       leaf ru-instance-id {
113         type string;
114         // [ast] added extra concat, because only 3 params are accepted in NTS
115         // must "re-match(current(), concat(/hw:hardware/hw:component/hw:mfg-name,
116         //  '_', /hw:hardware/hw:component/hw:model-name, '_',
117         //  /hw:hardware/hw:component/hw:serial-num ))";
118         must "re-match(current(), concat(concat(/hw:hardware/hw:component/hw:mfg-name,
119           '_', /hw:hardware/hw:component/hw:model-name), '_',
120           /hw:hardware/hw:component/hw:serial-num))";
121         // [ast] end fix
122         description
123           "a unique instance identifier that may be used to identify a
124           particular hardware instance, e.g., when used performing hierarchical
125           management via the O-DU.";
126       }
127
128       leaf supported-mplane-version {
129         type version;
130         default "1.0.0";
131         description "Parameter provides highest M-Plane specification version device is compliant with.";
132       }
133
134       leaf supported-cusplane-version {
135         type version;
136         default "1.0.0";
137         description "Parameter provides highest CUS-Plane specification version device is compliant with.";
138       }
139
140       list supported-header-mechanism {
141         description "list provides information regarding type and version of headers.";
142         key protocol;
143
144         leaf protocol {
145           type enumeration {
146             enum ECPRI {
147               description
148                 "Indicates that an O-RU supports the ecpri header format
149                 for the C/U plane";
150             }
151             enum IEEE-1914-3 {
152               description
153                 "Indicates that an O-RU supports the 1914.3 header format
154                 for the C/U plane";
155             }
156           }
157           description "Transport protocol type.";
158         }
159
160         leaf ecpri-concatenation-support {
161           when "../protocol = 'ECPRI'";
162           type boolean;
163           default false;
164           description
165             "This leaf is used to indicate whether the O-RU supports the optional
166             eCPRI concatenation capability";
167         }
168
169         leaf protocol-version {
170           type version;
171           default "1.0";
172           description "Header protocol version.";
173         }
174       }
175     }
176
177     container operational-state {
178       config false;
179       description
180         "Operational state for the O-RAN network element";
181       leaf restart-cause {
182         type enumeration {
183           enum POWER-ON {
184             description
185               "Equipment restarted because it was powered on";
186           }
187           enum SUPERVISION-WATCHDOG {
188             description
189               "Equipment restarted because it's supervision wathcdog timer wasn't reset
190               by a NETCONF client (inferring loss of NETCONF connectivity)";
191           }
192           enum MPLANE-TRIGGERED-RESTART {
193             description
194               "Equipment restarted because of an M-plane issued  rpc";
195           }
196           enum SOFTWARE-FAILURE {
197             description
198               "Equipment restarted because of software failure";
199           }
200           enum OTHER-WATCHDOG-TIMER {
201             description
202               "Equipment restarted because of some other non NETCONF watchdog timer";
203           }
204           enum UNKNOWN {
205             description
206               "The restart reason for the Equipment is unknown";
207           }
208         }
209         description "the cause for the last restart of the O-RAN Network Element";
210       }
211       leaf restart-datetime {
212         type yang:date-and-time;
213         description
214           "The system date and time when the system last restarted.";
215       }
216     }
217
218
219 // Common cross-WG container used for configuring clock and call home timers
220     container clock {
221       description
222         "System date and time properties used by all working groups.";
223
224       leaf timezone-name {
225         type timezone-name;
226         description
227           "An optional TZ database name to use for the system,
228            such as 'Europe/Stockholm'
229
230            Time zone name is an informative leaf and is NOT used in the
231            managed element to convert local time zone.
232
233            The managed element may include time zone name in measurement or
234            fault data.";
235       }
236
237       leaf timezone-utc-offset {
238         type int16 {
239           range "-720 .. 840";
240         }
241         units "minutes";
242         default 0;
243         description
244           "The number of minutes to add to UTC time to
245           identify the time zone for this system.  For example,
246           'UTC - 8:00 hours' would be represented as '-480'.";
247       }
248     }
249
250     leaf re-call-home-no-ssh-timer {
251       type uint16;
252       units seconds;
253       default 60;
254       description
255         "A common timer used by the O-RAN equipment to trigger the repeated call 
256         home procedure to all identified call home servers to which the O-RAN
257         equipment has not already an established SSH connection.
258
259         A value of 0 means that the O-RAN equipment shall disable operation
260         of the timer triggered NETCONF call home procedure.";
261     }
262   }
263
264 // Top level container
265
266   container operational-info{
267     description
268       "a collection of operational infor for the O-RU";
269     uses operational-group;
270
271   }
272
273 // RPCs
274
275   rpc reset {
276     nacm:default-deny-all;
277     description
278       "Management plane triggered restart of the radio unit.
279        A server SHOULD send an rpc reply to the client before
280        restarting the system.";
281
282   }
283 }