Remove openroadm and tapi models building
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-alarm@2020-05-29.yang
1 module org-openroadm-alarm {
2   namespace "http://org/openroadm/alarm";
3   prefix org-openroadm-alarm;
4
5   import ietf-yang-types {
6     prefix yang;
7     revision-date 2013-07-15;
8   }
9   import org-openroadm-resource {
10     prefix org-openroadm-resource;
11     revision-date 2020-05-29;
12   }
13   import org-openroadm-probable-cause {
14     prefix org-openroadm-probable-cause;
15     revision-date 2020-05-29;
16   }
17
18   organization
19     "Open ROADM MSA";
20   contact
21     "OpenROADM.org";
22   description
23     "YANG definitions of an alarm.
24
25      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
26      All other rights reserved.
27
28      Redistribution and use in source and binary forms, with or without modification,
29      are permitted provided that the following conditions are met:
30
31      * Redistributions of source code must retain the above copyright notice, this
32        list of conditions and the following disclaimer.
33      * Redistributions in binary form must reproduce the above copyright notice,
34        this list of conditions and the following disclaimer in the documentation and/or
35        other materials provided with the distribution.
36      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
37        contributors may be used to endorse or promote products derived from this software
38        without specific prior written permission.
39
40      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
41      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
42      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
43      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
44      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
46      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
47      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49      POSSIBILITY OF SUCH DAMAGE.";
50
51   revision 2020-05-29 {
52     description
53       "Version 7.1.0";
54   }
55   revision 2020-03-27 {
56     description
57       "Version 7.0.0";
58   }
59   revision 2019-11-29 {
60     description
61       "Version 6.1.0";
62   }
63   revision 2019-09-27 {
64     description
65       "Version 6.0.0";
66   }
67   revision 2019-05-31 {
68     description
69       "Version 5.1.0";
70   }
71   revision 2019-03-29 {
72     description
73       "Version 5.0.0";
74   }
75   revision 2018-11-30 {
76     description
77       "Version 4.1.0";
78   }
79   revision 2018-09-28 {
80     description
81       "Version 4.0.0";
82   }
83   revision 2018-03-30 {
84     description
85       "Version 3.0.0";
86   }
87   revision 2017-12-15 {
88     description
89       "Version 2.2";
90   }
91   revision 2017-09-29 {
92     description
93       "Version 2.1";
94   }
95   revision 2017-07-28 {
96     description
97       "Version 2.0.1 - added revision-date to imports";
98   }
99   revision 2016-10-14 {
100     description
101       "Version 1.2";
102   }
103
104   typedef severity {
105     type enumeration {
106       enum critical {
107         value 1;
108       }
109       enum major {
110         value 2;
111       }
112       enum minor {
113         value 3;
114       }
115       enum warning {
116         value 4;
117       }
118       enum clear {
119         value 5;
120       }
121       enum indeterminate {
122         value 6;
123       }
124     }
125     description
126       "Severity, based on X.733 perceived severity";
127   }
128
129   grouping alarm {
130     leaf id {
131       type string;
132       mandatory true;
133       description
134         "Uniquely id for this alarm, within the given management domain";
135     }
136     container resource {
137       description
138         "Resource under alarm";
139       uses org-openroadm-resource:resource;
140     }
141     container probableCause {
142       description
143         "Probable cause of alarm";
144       uses org-openroadm-probable-cause:probable-cause;
145     }
146     leaf raiseTime {
147       type yang:date-and-time;
148       mandatory true;
149       description
150         "Time alarm was raised";
151     }
152     leaf severity {
153       type severity;
154       mandatory true;
155       description
156         "Severity of alarm. Based on X.733 perceived severity.";
157     }
158     leaf circuit-id {
159       type string;
160       description
161         "Circuit-id for alarm correlation.";
162     }
163     leaf additional-detail {
164       type string;
165       description
166         "Provide additional descriptive text about the probable cause.";
167     }
168     leaf corrective-action {
169       type string;
170       description
171         "Provide recommended corrective actions for this probable cause, i.e. replace or restart a circuit pack, check wiring for the reported source, or secondary failure to be correlated ";
172     }
173   }
174
175   notification alarm-notification {
176     description
177       "Notification sent on initial alarm creation, as well as any time the alarm changes state, including clear";
178     uses alarm;
179   }
180
181   container active-alarm-list {
182     config false;
183     description
184       "List of currently active alarms. An alarm is removed from this table when the state transitions to clear.";
185     list activeAlarms {
186       key "id";
187       uses alarm;
188     }
189   }
190 }