Update docs conf.yaml version to Sulfur
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-tca@2020-03-27.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-alarm-pm-types {
10     prefix org-openroadm-common-alarm-pm-types;
11     revision-date 2019-11-29;
12   }
13   import org-openroadm-pm-types {
14     prefix org-openroadm-pm-types;
15     revision-date 2020-03-27;
16   }
17   import org-openroadm-resource-types {
18     prefix org-openroadm-resource-types;
19     revision-date 2019-11-29;
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       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 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-05-31 {
64     description
65       "Version 5.1.0";
66   }
67   revision 2019-03-29 {
68     description
69       "Version 5.0.0";
70   }
71   revision 2018-11-30 {
72     description
73       "Version 4.1.0";
74   }
75   revision 2018-09-28 {
76     description
77       "Version 4.0.0";
78   }
79   revision 2018-03-30 {
80     description
81       "Version 3.0.0";
82   }
83   revision 2017-12-15 {
84     description
85       "Version 2.2";
86   }
87   revision 2017-09-29 {
88     description
89       "Version 2.1";
90   }
91   revision 2017-08-28 {
92     description
93       "Version 2.0.2 - added back the missing pmParameterName container";
94   }
95   revision 2017-07-28 {
96     description
97       "Version 2.0.1 - added revision-date to imports";
98   }
99   revision 2017-06-26 {
100     description
101       "Version 2.0";
102   }
103   revision 2016-10-14 {
104     description
105       "Version 1.2";
106   }
107
108   typedef threshold-enum {
109     type enumeration {
110       enum high {
111         value 1;
112         description
113           "enum value for high";
114       }
115       enum low {
116         value 2;
117         description
118           "enum value for low";
119       }
120     }
121     description
122       "typedef for threshold enum";
123   }
124
125   grouping tca-resource-grp {
126     description
127       "group for TCA resources";
128     leaf tca-resource-instance {
129       type instance-identifier;
130       mandatory true;
131       description
132         "Retrieves all TCA assciated with the resource instance";
133     }
134     leaf tca-resource-type {
135       type org-openroadm-resource-types:resource-type-enum;
136       mandatory true;
137       description
138         "The supported tca-resource type associated with the given resource instance.";
139     }
140     leaf tca-resource-type-extension {
141       type string;
142       mandatory true;
143       description
144         "The resource type extension when the type is not defined in the resource-type-enum.";
145     }
146   }
147
148   grouping current-tca-group {
149     description
150       "TCA Data with current values";
151     uses tca-resource-grp;
152     leaf enabled {
153       type boolean;
154       mandatory true;
155       description
156         "Enable for the TCA entry";
157     }
158     list pm-entry {
159       key "type extension location direction";
160       description
161         "List of PM entries";
162       uses current-tca-pm-val-group;
163     }
164   }
165
166   grouping current-tca-pm-val-group {
167     description
168       "Grouping for the TCA PM";
169     uses org-openroadm-pm-types:pm-names;
170     leaf location {
171       type org-openroadm-common-alarm-pm-types:location;
172       description
173         "Location PM type";
174     }
175     leaf direction {
176       type org-openroadm-common-alarm-pm-types:direction;
177       description
178         "Direction PM type";
179     }
180     list measurement {
181       key "granularity threshold-type";
182       description
183         "List for PM measurement";
184       leaf granularity {
185         type org-openroadm-pm-types:pm-granularity;
186         description
187           "Granularity for the PM entry";
188       }
189       leaf threshold-type {
190         type threshold-enum;
191         description
192           "Threshold enum type";
193       }
194       leaf enabled {
195         type boolean;
196         description
197           "Measurement enabled";
198       }
199       leaf threshold-value {
200         type org-openroadm-pm-types:pm-data-type;
201         mandatory true;
202         description
203           "Threshold value";
204       }
205       leaf threshold-default {
206         type org-openroadm-pm-types:pm-data-type;
207         config false;
208         description
209           "Threshold default value";
210       }
211     }
212   }
213
214   notification tca-notification {
215     description
216       "TCA notification";
217     uses tca-resource-grp;
218     leaf pm-type {
219       type org-openroadm-pm-types:pm-names-enum;
220       mandatory true;
221       description
222         "PM type";
223     }
224     leaf pm-extension {
225       type string;
226       mandatory true;
227       description
228         "PM extension";
229     }
230     leaf pm-location {
231       type org-openroadm-common-alarm-pm-types:location;
232       mandatory true;
233       description
234         "PM location";
235     }
236     leaf pm-direction {
237       type org-openroadm-common-alarm-pm-types:direction;
238       mandatory true;
239       description
240         "PM direction";
241     }
242     leaf pm-granularity {
243       type org-openroadm-pm-types:pm-granularity;
244       mandatory true;
245       description
246         "PM granularity";
247     }
248     leaf threshold-value {
249       type org-openroadm-pm-types:pm-data-type;
250       mandatory true;
251       description
252         "threshold value";
253     }
254     leaf threshold-type {
255       type threshold-enum;
256       mandatory true;
257       description
258         "Threshold Crossed";
259     }
260     leaf pm-value {
261       type org-openroadm-pm-types:pm-data-type;
262       mandatory true;
263       description
264         "PM Value";
265     }
266     leaf raise-time {
267       type yang:date-and-time;
268       mandatory true;
269       description
270         "PM raise time";
271     }
272   }
273
274   container potential-tca-list {
275     description
276       "List of current TCAs.";
277     list tca-entry {
278       key "tca-resource-type tca-resource-type-extension tca-resource-instance";
279       description
280         "List of current TCA entries";
281       uses current-tca-group;
282     }
283   }
284 }