Bug fix.
[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       // [ast] Fix for list without a key
79       key name;
80       // [ast] end fix
81       leaf name {
82         type string {
83           length "1..255";
84         }
85         mandatory true;
86
87         description
88           "Represents the Object or source that is suspected to be affected by this fault";
89       }
90       min-elements 1;
91       max-elements 100;
92
93       description
94         "List of affected-objects";
95     }
96
97     leaf fault-severity {
98       type enumeration {
99         enum CRITICAL {
100           description
101             "Critical alarm means that this device is not able to perform any further service";
102         }
103         enum MAJOR {
104           description
105             "Major alarm appeared on the device";
106         }
107         enum MINOR {
108           description
109             "Minor alarm appeared on the device";
110         }
111         enum WARNING {
112           description
113             "Warning is being reported by the device";
114         }
115       }
116       mandatory true;
117
118       description
119         "Fault severity defines the severity level of the fault. A notification, whose fault severity has the value 'warning',
120         is a special type of an alarm notification. For these alarm notifications,
121         the Master Agent does not expect to receive a clear alarm notification.";
122     }
123
124     leaf is-cleared {
125       type boolean;
126       mandatory true;
127
128       description
129         "Fault state determines the type of the event. Not used if faultSeverity is WARNING.";
130     }
131
132     leaf fault-text {
133       type string {
134         length "0..255";
135       }
136
137       description
138         "Textual description of the fault.";
139     }
140
141     leaf event-time {
142       type yang:date-and-time;
143       mandatory true;
144
145       description
146         "Timestamp to indicate the time when the fault is detected/cleared.";
147     }
148   }
149
150   container active-alarm-list {
151     list active-alarms {
152       // [ast] Fix for list without a key
153       key fault-id;
154       // [ast] end fix
155       uses alarm;
156
157       description
158         "List of currenty active alarms";
159     }
160     config false;
161
162     description
163       "List of currently active alarms. An alarm is removed from this table when the state transitions to clear.";
164   }
165
166   notification alarm-notif {
167     uses alarm;
168
169     description
170       "Notification sent on initial alarm creation, as well as any time the alarm changes state, including clear";
171   }
172 }