92238aade610de8acb29ba17cceb9cf230e1ff1e
[sim/o1-interface.git] / ntsimulator / yang / o-ran / ru-fh / o-ran-fm.yang
1 module o-ran-fm {
2   yang-version 1.1;
3   namespace "urn:o-ran:fm:1.0";
4   prefix "o-ran-fm";
5
6   import ietf-yang-types {
7     prefix yang;
8     revision-date 2013-07-15;
9   }
10
11   organization "O-RAN Alliance";
12
13   contact
14     "www.o-ran.org";
15
16   description
17     "This module defines alarm reporting mechanism.
18
19     Copyright 2019 the O-RAN Alliance.
20
21     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
22     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31     POSSIBILITY OF SUCH DAMAGE.
32
33     Redistribution and use in source and binary forms, with or without
34     modification, are permitted provided that the following conditions are met:
35
36     * Redistributions of source code must retain the above copyright notice,
37     this list of conditions and the above disclaimer.
38     * Redistributions in binary form must reproduce the above copyright notice,
39     this list of conditions and the above disclaimer in the documentation
40     and/or other materials provided with the distribution.
41     * Neither the Members of the O-RAN Alliance nor the names of its
42     contributors may be used to endorse or promote products derived from
43     this software without specific prior written permission.";
44
45   revision "2019-02-04" {
46     description
47       "version 1.0.0
48
49       1) imported model from xRAN
50       2) changed namespace and reference from xran to o-ran";
51
52     reference "ORAN-WG4.M.0-v01.00";
53   }
54
55   grouping alarm {
56     description
57       "Gropuping which can uniquely identify alarm";
58
59     leaf fault-id {
60       type uint16;
61       mandatory true;
62
63       description
64         "Fault specific Id that identifies the fault.";
65     }
66
67     leaf fault-source {
68       type string {
69         length "1..255";
70       }
71       mandatory true;
72
73       description
74         "Represents the Object or source that is suspected to be faulty.";
75     }
76
77     list affected-objects {
78       key name;
79       leaf name {
80         type string {
81           length "1..255";
82         }
83         mandatory true;
84
85         description
86           "Represents the Object or source that is suspected to be affected by this fault";
87       }
88       min-elements 1;
89       max-elements 100;
90
91       description
92         "List of affected-objects";
93     }
94
95     leaf fault-severity {
96       type enumeration {
97         enum CRITICAL {
98           description
99             "Critical alarm means that this device is not able to perform any further service";
100         }
101         enum MAJOR {
102           description
103             "Major alarm appeared on the device";
104         }
105         enum MINOR {
106           description
107             "Minor alarm appeared on the device";
108         }
109         enum WARNING {
110           description
111             "Warning is being reported by the device";
112         }
113       }
114       mandatory true;
115
116       description
117         "Fault severity defines the severity level of the fault. A notification, whose fault severity has the value 'warning',
118         is a special type of an alarm notification. For these alarm notifications,
119         the Master Agent does not expect to receive a clear alarm notification.";
120     }
121
122     leaf is-cleared {
123       type boolean;
124       mandatory true;
125
126       description
127         "Fault state determines the type of the event. Not used if faultSeverity is WARNING.";
128     }
129
130     leaf fault-text {
131       type string {
132         length "0..255";
133       }
134
135       description
136         "Textual description of the fault.";
137     }
138
139     leaf event-time {
140       type yang:date-and-time;
141       mandatory true;
142
143       description
144         "Timestamp to indicate the time when the fault is detected/cleared.";
145     }
146   }
147
148   container active-alarm-list {
149     list active-alarms {
150       key fault-id;
151       uses alarm;
152
153       description
154         "List of currenty active alarms";
155     }
156     config false;
157
158     description
159       "List of currently active alarms. An alarm is removed from this table when the state transitions to clear.";
160   }
161
162   notification alarm-notif {
163     uses alarm;
164
165     description
166       "Notification sent on initial alarm creation, as well as any time the alarm changes state, including clear";
167   }
168 }