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