Sync Common folder
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-tca@2017-12-15.yang
1 module org-openroadm-tca {
2   namespace "http://org/openroadm/tca";
3   prefix org-openroadm-tca;
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-pm-types {
14     prefix org-openroadm-pm-types;
15     revision-date 2017-12-15;
16   }
17   import org-openroadm-resource {
18     prefix org-openroadm-resource;
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 Threshold Crossing Alert types.
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-08-28 {
64     description
65       "Version 2.0.2 - added back the missing pmParameterName container";
66   }
67   revision 2017-07-28 {
68     description
69       "Version 2.0.1 - added revision-date to imports";
70   }
71   revision 2017-06-26 {
72     description
73       "Version 2.0";
74   }
75   revision 2016-10-14 {
76     description
77       "Version 1.2";
78   }
79
80   grouping tca {
81     leaf id {
82       type string;
83       mandatory true;
84     }
85     container resource {
86       uses org-openroadm-resource:resource;
87     }
88     container pmParameterName {
89       uses org-openroadm-pm-types:pm-names;
90     }
91     leaf granularity {
92       type org-openroadm-pm-types:pm-granularity;
93       mandatory true;
94     }
95     leaf location {
96       type org-openroadm-common-types:location;
97       mandatory true;
98     }
99     leaf direction {
100       type org-openroadm-common-types:direction;
101       mandatory true;
102     }
103   }
104
105   grouping potential-tca {
106     uses tca;
107     leaf lowThresholdValue {
108       type org-openroadm-pm-types:pm-data-type;
109     }
110     leaf highThresholdValue {
111       type org-openroadm-pm-types:pm-data-type;
112     }
113   }
114
115   notification tca-notification {
116     uses tca;
117     leaf thresholdValue {
118       type org-openroadm-pm-types:pm-data-type;
119       mandatory true;
120     }
121     leaf thresholdType {
122       type enumeration {
123         enum "high" {
124           value 1;
125         }
126         enum "low" {
127           value 2;
128         }
129       }
130       mandatory true;
131       description
132         "Threshold Crossed";
133     }
134     leaf pmParameterValue {
135       type org-openroadm-pm-types:pm-data-type;
136       mandatory true;
137     }
138     leaf raiseTime {
139       type yang:date-and-time;
140       mandatory true;
141     }
142   }
143   container potential-tca-list {
144     description
145       "This is the set of threshold crossing alerts monitored on the device. Alerts are
146        enabled/disabled by adding/deleting the high/low threshold values from the list.";
147     list tca {
148       key "id";
149       uses potential-tca;
150     }
151   }
152 }