Rewrite NTS Framework.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran / yang / 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         must "re-match(current(), concat(/hw:hardware/hw:component/hw:mfg-name,
115             '_', /hw:hardware/hw:component/hw:model-name, '_',
116             /hw:hardware/hw:component/hw:serial-num ))";
117         description
118           "a unique instance identifier that may be used to identify a
119           particular hardware instance, e.g., when used performing hierarchical
120           management via the O-DU.";
121       }
122
123       leaf supported-mplane-version {
124         type version;
125         default "1.0.0";
126         description "Parameter provides highest M-Plane specification version device is compliant with.";
127       }
128
129       leaf supported-cusplane-version {
130         type version;
131         default "1.0.0";
132         description "Parameter provides highest CUS-Plane specification version device is compliant with.";
133       }
134
135       list supported-header-mechanism {
136         description "list provides information regarding type and version of headers.";
137         key protocol;
138
139         leaf protocol {
140           type enumeration {
141             enum ECPRI {
142               description
143                 "Indicates that an O-RU supports the ecpri header format
144                 for the C/U plane";
145             }
146             enum IEEE-1914-3 {
147               description
148                 "Indicates that an O-RU supports the 1914.3 header format
149                 for the C/U plane";
150             }
151           }
152           description "Transport protocol type.";
153         }
154
155         leaf ecpri-concatenation-support {
156           when "../protocol = 'ECPRI'";
157           type boolean;
158           default false;
159           description
160             "This leaf is used to indicate whether the O-RU supports the optional
161             eCPRI concatenation capability";
162         }
163
164         leaf protocol-version {
165           type version;
166           default "1.0";
167           description "Header protocol version.";
168         }
169       }
170     }
171
172     container operational-state {
173       config false;
174       description
175         "Operational state for the O-RAN network element";
176       leaf restart-cause {
177         type enumeration {
178           enum POWER-ON {
179             description
180               "Equipment restarted because it was powered on";
181           }
182           enum SUPERVISION-WATCHDOG {
183             description
184               "Equipment restarted because it's supervision wathcdog timer wasn't reset
185               by a NETCONF client (inferring loss of NETCONF connectivity)";
186           }
187           enum MPLANE-TRIGGERED-RESTART {
188             description
189               "Equipment restarted because of an M-plane issued  rpc";
190           }
191           enum SOFTWARE-FAILURE {
192             description
193               "Equipment restarted because of software failure";
194           }
195           enum OTHER-WATCHDOG-TIMER {
196             description
197               "Equipment restarted because of some other non NETCONF watchdog timer";
198           }
199           enum UNKNOWN {
200             description
201               "The restart reason for the Equipment is unknown";
202           }
203         }
204         description "the cause for the last restart of the O-RAN Network Element";
205       }
206       leaf restart-datetime {
207         type yang:date-and-time;
208         description
209           "The system date and time when the system last restarted.";
210       }
211     }
212
213
214 // Common cross-WG container used for configuring clock and call home timers
215     container clock {
216       description
217         "System date and time properties used by all working groups.";
218
219       leaf timezone-name {
220         type timezone-name;
221         description
222           "An optional TZ database name to use for the system,
223            such as 'Europe/Stockholm'
224
225            Time zone name is an informative leaf and is NOT used in the
226            managed element to convert local time zone.
227
228            The managed element may include time zone name in measurement or
229            fault data.";
230       }
231
232       leaf timezone-utc-offset {
233         type int16 {
234           range "-720 .. 840";
235         }
236         units "minutes";
237         default 0;
238         description
239           "The number of minutes to add to UTC time to
240           identify the time zone for this system.  For example,
241           'UTC - 8:00 hours' would be represented as '-480'.";
242       }
243     }
244
245     leaf re-call-home-no-ssh-timer {
246       type uint16;
247       units seconds;
248       default 60;
249       description
250         "A common timer used by the O-RAN equipment to trigger the repeated call 
251         home procedure to all identified call home servers to which the O-RAN
252         equipment has not already an established SSH connection.
253
254         A value of 0 means that the O-RAN equipment shall disable operation
255         of the timer triggered NETCONF call home procedure.";
256     }
257   }
258
259 // Top level container
260
261   container operational-info{
262     description
263       "a collection of operational infor for the O-RU";
264     uses operational-group;
265
266   }
267
268 // RPCs
269
270   rpc reset {
271     nacm:default-deny-all;
272     description
273       "Management plane triggered restart of the radio unit.
274        A server SHOULD send an rpc reply to the client before
275        restarting the system.";
276
277   }
278 }