Sync Common folder
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-alarm@2017-12-15.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-common-types {
10     prefix org-openroadm-common-types;
11     revision-date 2017-12-15;
12   }
13   import org-openroadm-resource {
14     prefix org-openroadm-resource;
15     revision-date 2017-12-15;
16   }
17   import org-openroadm-probable-cause {
18     prefix org-openroadm-probable-cause;
19     revision-date 2017-12-15;
20   }
21
22   organization
23     "Open ROADM MSA";
24   contact
25     "OpenROADM.org";
26   description
27     "YANG definitions of an alarm.
28      
29      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
30      AT&T Intellectual Property.  All other rights reserved.
31      
32      Redistribution and use in source and binary forms, with or without modification, 
33      are permitted provided that the following conditions are met:
34      
35      * Redistributions of source code must retain the above copyright notice, this 
36        list of conditions and the following disclaimer.
37      * Redistributions in binary form must reproduce the above copyright notice, 
38        this list of conditions and the following disclaimer in the documentation and/or 
39        other materials provided with the distribution.
40      * Neither the Members of the Open ROADM MSA Agreement nor the names of its 
41        contributors may be used to endorse or promote products derived from this software 
42        without specific prior written permission.
43      
44      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS'' 
45      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
46      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
47      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT, 
48      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
49      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA, 
50      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
51      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
52      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
53      POSSIBILITY OF SUCH DAMAGE.";
54
55   revision 2017-12-15 {
56     description
57       "Version 2.2";
58   }
59   revision 2017-09-29 {
60     description
61       "Version 2.1";
62   }
63   revision 2017-07-28 {
64     description
65       "Version 2.0.1 - added revision-date to imports";
66   }
67   revision 2016-10-14 {
68     description
69       "Version 1.2";
70   }
71
72   grouping alarm {
73     leaf id {
74       type string;
75       mandatory true;
76       description
77         "Uniquely id for this alarm, within the given management domain";
78     }
79     container resource {
80       description
81         "Resource under alarm";
82       uses org-openroadm-resource:resource;
83     }
84     container probableCause {
85       description
86         "Probable cause of alarm";
87       uses org-openroadm-probable-cause:probable-cause;
88     }
89     leaf raiseTime {
90       type yang:date-and-time;
91       mandatory true;
92       description
93         "Time alarm was raised";
94     }
95     leaf severity {
96       type org-openroadm-common-types:severity;
97       mandatory true;
98       description
99         "Severity of alarm. Based on X.733 perceived severity.";
100     }
101     leaf circuit-id {
102       type string;
103       description
104         "Circuit-id for alarm correlation.";
105     }
106     leaf additional-detail {
107       type string;
108       description
109         "Provide additional descriptive text about the probable cause.";
110     }
111     leaf corrective-action {
112       type string;
113       description
114         "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 ";
115     }
116   }
117
118   notification alarm-notification {
119     description
120       "Notification sent on initial alarm creation, as well as any time the alarm changes state, including clear";
121     uses alarm;
122   }
123   container active-alarm-list {
124     config false;
125     description
126       "List of currently active alarms. An alarm is removed from this table when the state transitions to clear.";
127     list activeAlarms {
128       key "id";
129       uses alarm;
130     }
131   }
132 }