Add supoprt for D release use-case.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / o-ran-supervision@2020-12-10.yang
1 module o-ran-supervision {
2   yang-version 1.1;
3   namespace "urn:o-ran:supervision:1.0";
4   prefix "o-ran-supervision";
5
6   import ietf-yang-types {
7     prefix yang;
8   }
9
10   import o-ran-wg4-features {
11     prefix or-feat;
12   }
13
14   import ietf-inet-types {
15     prefix "inet";
16   }
17   
18   organization "O-RAN Alliance";
19
20   contact
21     "www.o-ran.org";
22
23   description
24     "This module defines the configuration data and supervision RPCs that are
25     used to detect loss M-Plane connectivity.
26
27     Copyright 2020 the O-RAN Alliance.
28
29     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
30     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
33     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39     POSSIBILITY OF SUCH DAMAGE.
40
41     Redistribution and use in source and binary forms, with or without
42     modification, are permitted provided that the following conditions are met:
43
44     * Redistributions of source code must retain the above copyright notice,
45     this list of conditions and the above disclaimer.
46     * Redistributions in binary form must reproduce the above copyright notice,
47     this list of conditions and the above disclaimer in the documentation
48     and/or other materials provided with the distribution.
49     * Neither the Members of the O-RAN Alliance nor the names of its
50     contributors may be used to endorse or promote products derived from
51     this software without specific prior written permission.";
52
53   revision "2020-12-10" {
54     description
55       "version 5.0.0
56
57       1) added Event Producer-Collector supervision";
58
59     reference "ORAN-WG4.M.0-v05.00";
60   }
61
62   revision "2020-04-17" {
63     description
64       "version 3.0.0
65
66       1) added output string to enable indication if config modification change has failed
67       2) corrected model description
68       3) removed erroneous text in notification description";
69
70     reference "ORAN-WG4.M.0-v03.00";
71   }
72
73   revision "2019-07-03" {
74     description
75       "version 2.0.0
76
77       1) added leafs for CU plane monitoring
78       2) backward compatible changes to introduce groupings";
79
80     reference "ORAN-WG4.M.0-v01.00";
81   }
82
83   revision "2019-02-04" {
84     description
85       "version 1.0.0
86
87       1) imported model from xRAN
88       2) changed namespace and reference from xran to o-ran";
89
90     reference "ORAN-WG4.M.0-v01.00";
91   }
92
93   typedef event-collector-id {
94     type union {
95       type inet:ip-address;
96       type inet:uri;
97     }
98     description "An Event Collector identifier";
99   }
100
101   grouping watchdog-input {
102     leaf supervision-notification-interval {
103       type uint16;
104       units seconds;
105       default 60;
106       description
107         "The interval in seconds at which supervision notifications are sent.
108         If not specified the default value of 60 seconds shall apply.";
109     }
110     leaf guard-timer-overhead {
111       type uint16;
112       units seconds;
113       default 10;
114       description
115         "This is overhead added to the supervision timer used to calculate the
116          supervision wathcdog timer. i.e.,
117
118          supervision timer = notification timer + guard-timer-overhead
119
120          If not specified the default value of 10 seconds shall apply.
121
122          Failure to send this rpc again within the timeout sets the radio into
123          'loss of supervision' state.
124
125          NOTE - The supervision timer MUST not be less that the confimed
126          timeout timer (when the feature is supported).
127
128          This type of constraint (using an RPCs input) cannot be formally
129          expressed in YANG.";
130     }
131   }
132
133   grouping watchdog-output {
134     leaf next-update-at {
135       type yang:date-and-time;
136       description
137         "Indicates the time when the next supervision notification is expected.";
138     }
139     leaf error-message {
140       type string;
141
142       description
143         "An optional error message, e.g., used when the RPC input attempts to
144         modify a locked running configuration.
145
146         Take note, the supervision-notification-interval and guard-timer-overhead
147         have default values and so their values can be modified even when a leaf is
148         not included in the RPC input.";
149     }
150   }
151
152   grouping supervision-group {
153     container cu-plane-monitoring {
154       description "container describing operation of CU plane monitoring";
155       presence
156         "Indicates O-RU supports timer based cu-plane monitoring interval. If
157         this container is NOT present, the opertaion of the O-RU is undefined.";
158
159       leaf configured-cu-monitoring-interval {
160         type uint8 {
161           range "0..160";
162         }
163         default 160;
164         units milliseconds;
165         description
166           "This value corresponds to the configured value of the timer used by
167           the O-RU to monitor the C/U plane connection.
168
169           A value of 0 means that the O-RU's shall disable its CU plane
170           monitoring.
171
172           A NETCONF client should configure the value according to the
173           configuration of the PHY layer and/or C/U plane section types
174           supported and/or any fault tolerant operation. For example,
175
176           i) when opertaing with an O-DU supporting non-LAA LTE, this value can
177           be configured to a value according to the repetition time of
178           transmitted reference symbols across the fronthaul interface
179           ii) when opertaing with an O-DU supporting C-Plane Section Type 0,
180           this value can configured to a value according to the minimum
181           repetition interval of section type 0.
182           iii) when operating with an O-DU supporting fault tolerant operation,
183           this value can be configured according to the fault tolerant heartbeat
184           interval ";
185       }
186     }
187     container event-collector-monitoring {
188       if-feature "or-feat:NON-PERSISTENT-MPLANE";
189       description "container describing operation of Event Collector monitoring";
190
191       leaf heartbeat-interval {
192         type uint8;
193         default 60;
194         units seconds;
195         description "the heartbeat interval";
196       }
197
198       leaf-list heartbeat-recipient-id {
199         type event-collector-id;
200         description
201           "A configured Event collector identity, to which the O-RU shall send heartbeat notifications";
202       }
203     }
204   }
205
206   container supervision {
207     uses supervision-group;
208     // other WG specific monitoring containers follow here
209   }
210
211   rpc supervision-watchdog-reset {
212     description
213       "rpc to reset the watchdog timer";
214     input {
215       uses watchdog-input;
216     }
217
218           output {
219       uses watchdog-output;
220           }
221   }
222
223   notification supervision-notification {
224     description
225       "Notification to indicate that NETCONF management interface is up.";
226
227   }
228 }