Refactor folder structure.
[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-04-08" {
55     description
56       "version 1.0.2
57
58       1) added ru-instance-id ";
59
60     reference "ORAN-WG4.M.0-v01.00";
61   }
62
63   revision "2019-03-07" {
64     description
65       "version 1.0.1
66
67       1) backward compatible changes to introduce groupings.";
68
69     reference "ORAN-WG4.M.0-v01.00";
70   }
71
72   revision "2019-02-04" {
73     description
74       "version 1.0.0
75
76       1) imported model from xRAN
77       2) changed namespace and reference from xran to o-ran";
78
79     reference "ORAN-WG4.M.0-v01.00";
80   }
81
82   typedef version {
83     type string {
84       pattern '[0-9]+(\.[0-9]+){1,2}';
85     }
86     description
87       "this type definition is used to represent the version of the WG4
88       fronthaul interface.";
89   }
90
91   grouping operational-group {
92
93 // Container used for WG4 specific declarations
94     container declarations {
95       //FIXME - determine whether it is acceptable to WG4 to change this to a presence
96       //container, where the presence indicates the NETCONF server supports WG4
97       //defined functionality
98       config false;
99       description "WG4 Specific Declarations of supported version of standards";
100
101       leaf ru-instance-id {
102         type string;
103         must "re-match(current(), concat(concat(/hw:hardware/hw:component/hw:mfg-name,
104           '_', /hw:hardware/hw:component/hw:model-name), '_',
105           /hw:hardware/hw:component/hw:serial-num))";
106         description
107           "a unique instance identifier that may be used to identify a
108           particular hardware instance, e.g., when used performing hierarchical
109           management via the O-DU.";
110       }
111
112       leaf supported-mplane-version {
113         type version;
114         default "1.0.0";
115         description "Parameter provides highest M-Plane specification version device is compliant with.";
116       }
117
118       leaf supported-cusplane-version {
119         type version;
120         default "1.0.0";
121         description "Parameter provides highest CUS-Plane specification version device is compliant with.";
122       }
123
124       list supported-header-mechanism {
125         description "list provides information regarding type and version of headers.";
126         key protocol;
127
128         leaf protocol {
129           type enumeration {
130             enum ECPRI {
131               description
132                 "Indicates that an O-RU supports the ecpri header format
133                 for the C/U plane";
134             }
135             enum IEEE-1914-3 {
136               description
137                 "Indicates that an O-RU supports the 1914.3 header format
138                 for the C/U plane";
139             }
140           }
141           description "Transport protocol type.";
142         }
143
144         leaf ecpri-concatenation-support {
145           when "../protocol = 'ECPRI'";
146           type boolean;
147           default false;
148           description
149             "This leaf is used to indicate whether the O-RU supports the optional
150             eCPRI concatenation capability";
151         }
152
153         leaf protocol-version {
154           type version;
155           default "1.0";
156           description "Header protocol version.";
157         }
158       }
159     }
160
161     container operational-state {
162       config false;
163       description
164         "Operational state for the O-RAN network element";
165       leaf restart-cause {
166         type enumeration {
167           enum POWER-ON {
168             description
169               "Equipment restarted because it was powered on";
170           }
171           enum SUPERVISION-WATCHDOG {
172             description
173               "Equipment restarted because it's supervision wathcdog timer wasn't reset
174               by a NETCONF client (inferring loss of NETCONF connectivity)";
175           }
176           enum MPLANE-TRIGGERED-RESTART {
177             description
178               "Equipment restarted because of an M-plane issued  rpc";
179           }
180           enum SOFTWARE-FAILURE {
181             description
182               "Equipment restarted because of software failure";
183           }
184           enum OTHER-WATCHDOG-TIMER {
185             description
186               "Equipment restarted because of some other non NETCONF watchdog timer";
187           }
188           enum UNKNOWN {
189             description
190               "The restart reason for the Equipment is unknown";
191           }
192         }
193         description "the cause for the last restart of the O-RAN Network Element";
194       }
195       leaf restart-datetime {
196         type yang:date-and-time;
197         description
198           "The system date and time when the system last restarted.";
199       }
200     }
201
202
203 // Common cross-WG container used for configuring clock and call home timers
204     container clock {
205       description
206         "System date and time properties used by all working groups.";
207
208       leaf timezone-utc-offset {
209         type int16 {
210           range "-720 .. 840";
211         }
212         units "minutes";
213         default 0;
214         description
215           "The number of minutes to add to UTC time to
216           identify the time zone for this system.  For example,
217           'UTC - 8:00 hours' would be represented as '-480'.";
218       }
219     }
220
221     leaf re-call-home-no-ssh-timer {
222       type uint16;
223       units seconds;
224       default 60;
225       description
226         "A common timer used by the O-RAN equipment to trigger the repeated call 
227         home procedure to all identified call home servers to which the O-RAN
228         equipment has not already an established SSH connection.
229
230         A value of 0 means that the O-RAN equipment shall disable operation
231         of the timer triggered NETCONF call home procedure.";
232     }
233   }
234
235 // Top level container
236
237   container operational-info{
238     description
239       "a collection of operational infor for the O-RU";
240     uses operational-group;
241
242   }
243
244 // RPCs
245
246   rpc reset {
247     nacm:default-deny-all;
248     description
249       "Management plane triggered restart of the radio unit.
250        A server SHOULD send an rpc reply to the client before
251        restarting the system.";
252
253   }
254 }