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