Refactor folder structure.
[sim/o1-interface.git] / ntsimulator / yang / x-ran / xran-fm.yang
1 module xran-fm {
2   yang-version 1.1;
3   namespace "urn:xran:fm:1.0";
4   prefix "xran-fm";
5
6   import ietf-yang-types {
7     prefix yang;
8     revision-date 2013-07-15;
9   }
10
11   organization "xRAN Forum";
12
13   contact
14     "www.xran.org";
15
16   description
17     "This module defines alarm reporting mechanism.
18
19     Copyright 2018 the xRAN Forum.
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 xRAN Forum 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 "2018-07-20" {
46     description
47       "version 1.0.0 - First release of the xRAN YANG M-Plane models.
48
49       This version of the model supports v01.00 of the corrsponding xRAN
50       M-Plane Specification.";
51     reference "XRAN-FH.MP.0-v01.00";
52   }
53
54   grouping alarm {
55     description
56       "Gropuping which can uniquely identify alarm";
57
58     leaf fault-id {
59       type uint16;
60       mandatory true;
61
62       description
63         "Fault specific Id that identifies the fault.";
64     }
65
66     leaf fault-source {
67       type string {
68         length "1..255";
69       }
70       mandatory true;
71
72       description
73         "Represents the Object or source that is suspected to be faulty.";
74     }
75
76     list affected-objects {
77       key "name";
78       leaf name {
79         type string {
80           length "1..255";
81         }
82         mandatory true;
83
84         description
85           "Represents the Object or source that is suspected to be affected by this fault";
86       }
87       min-elements 1;
88       max-elements 100;
89
90       description
91         "List of affected-objects";
92     }
93
94     leaf fault-severity {
95       type enumeration {
96         enum CRITICAL {
97           description
98             "Critical alarm means that this device is not able to perform any further service";
99         }
100         enum MAJOR {
101           description
102             "Major alarm appeared on the device";
103         }
104         enum MINOR {
105           description
106             "Minor alarm appeared on the device";
107         }
108         enum WARNING {
109           description
110             "Warning is being reported by the device";
111         }
112       }
113       mandatory true;
114
115       description
116         "Fault severity defines the severity level of the fault. A notification, whose fault severity has the value 'warning',
117         is a special type of an alarm notification. For these alarm notifications,
118         the Master Agent does not expect to receive a clear alarm notification.";
119     }
120
121     leaf is-cleared {
122       type boolean;
123       mandatory true;
124
125       description
126         "Fault state determines the type of the event. Not used if faultSeverity is WARNING.";
127     }
128
129     leaf fault-text {
130       type string {
131         length "0..255";
132       }
133
134       description
135         "Textual description of the fault.";
136     }
137
138     leaf event-time {
139       type yang:date-and-time;
140       mandatory true;
141
142       description
143         "Timestamp to indicate the time when the fault is detected/cleared.";
144     }
145   }
146
147   container active-alarm-list {
148     list active-alarms {
149       key "fault-id";
150       uses alarm;
151
152       description
153         "List of currenty active alarms";
154     }
155     config false;
156
157     description
158       "List of currently active alarms. An alarm is removed from this table when the state transitions to clear.";
159   }
160
161   notification alarm-notif {
162     uses alarm;
163
164     description
165       "Notification sent on initial alarm creation, as well as any time the alarm changes state, including clear";
166   }
167 }