Update docs conf.yaml version to Sulfur
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-common-types@2020-05-29.yang
1 module org-openroadm-common-types {
2   namespace "http://org/openroadm/common-types";
3   prefix org-openroadm-common-types;
4
5   organization
6     "Open ROADM MSA";
7   contact
8     "OpenROADM.org";
9   description
10     "YANG definitions of common types.
11
12       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
13       All other rights reserved.
14
15       Redistribution and use in source and binary forms, with or without modification,
16       are permitted provided that the following conditions are met:
17
18       * Redistributions of source code must retain the above copyright notice, this
19         list of conditions and the following disclaimer.
20       * Redistributions in binary form must reproduce the above copyright notice,
21         this list of conditions and the following disclaimer in the documentation and/or
22         other materials provided with the distribution.
23       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
24         contributors may be used to endorse or promote products derived from this software
25         without specific prior written permission.
26
27       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
28       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
31       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
33       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36       POSSIBILITY OF SUCH DAMAGE";
37
38   revision 2020-05-29 {
39     description
40       "Version 7.1.0";
41   }
42   revision 2020-03-27 {
43     description
44       "Version 7.0.0";
45   }
46   revision 2019-11-29 {
47     description
48       "Version 6.1.0";
49   }
50   revision 2019-09-27 {
51     description
52       "Version 6.0.0";
53   }
54   revision 2019-05-31 {
55     description
56       "Version 5.1.0";
57   }
58   revision 2019-03-29 {
59     description
60       "Version 5.0.0";
61   }
62   revision 2018-11-30 {
63     description
64       "Version 4.1.0";
65   }
66   revision 2018-09-28 {
67     description
68       "Version 4.0.0";
69   }
70   revision 2018-03-30 {
71     description
72       "Version 3.0.0";
73   }
74   revision 2017-12-15 {
75     description
76       "Version 2.2";
77   }
78   revision 2017-09-29 {
79     description
80       "Version 2.1";
81   }
82   revision 2017-06-26 {
83     description
84       "Version 2.0";
85   }
86   revision 2016-10-14 {
87     description
88       "Version 1.2";
89   }
90
91   typedef activate-notification-type {
92     type enumeration {
93       enum activate {
94         value 1;
95         description
96           "software or database activation";
97       }
98       enum commit {
99         value 2;
100         description
101           "commit the software or database.
102            For software activate, this event can happen in the following scenarios:
103              1) immediately when user issue sw-activate command without validationTimer
104                 or if the validationTimer is specified as 00-00-00;
105              2) when user issue cancel-validation-timer before it expires and with accept=true.
106            For database activate, this event can occur in the following scenarios:
107              1) immediately when user issue db-activate command without rollBackTimer
108                 or if the rollBackTimer is specified as 00-00-00;
109              2) when user issue cancel-rollback-timer before it expires and with accept=true.";
110       }
111       enum cancel {
112         value 3;
113         description
114           "cancel the database or software activation operation.
115            For software activate, this event can happen in the following cases:
116              1) when the validationTimer expires;
117              2) when the user issues cancel-validation-timer with accept=false.
118            For database activate, this event can happen in the following cases:
119              1) when the rollBackTimer expires;
120              2) when the user issues cancel-rollback-timer with accept=false.";
121       }
122     }
123     description
124       "Type of notification on software or database activation events";
125   }
126
127   typedef rpc-status {
128     type enumeration {
129       enum Successful {
130         value 1;
131       }
132       enum Failed {
133         value 2;
134       }
135     }
136     description
137       "status of RPC ";
138   }
139
140   typedef extended-rpc-status {
141     type enumeration {
142       enum Successful {
143         value 1;
144       }
145       enum Failed {
146         value 2;
147       }
148       enum In-progress {
149         value 3;
150       }
151     }
152     description
153       "status of RPC ";
154   }
155
156   typedef openroadm-version-type {
157     type enumeration {
158       enum 1.0 {
159         value 1;
160         description
161           "value for 1.0";
162       }
163       enum 2.0 {
164         value 2;
165         description
166           "value for 2.0";
167       }
168       enum 2.1 {
169         value 3;
170         description
171           "value for 2.1";
172       }
173       enum 2.2 {
174         value 4;
175         description
176           "value for 2.2";
177       }
178       enum 3.0 {
179         value 5;
180         description
181           "value for 3.0";
182       }
183       enum 3.1 {
184         value 6;
185         description
186           "value for 3.1";
187       }
188       enum 4.0 {
189         value 7;
190         description
191           "value for 4.0";
192       }
193       enum 2.2.1 {
194         value 8;
195         description
196           "value for 2.2.1";
197       }
198       enum 4.1 {
199         value 9;
200         description
201           "value for 4.1";
202       }
203       enum 3.1.1 {
204         value 10;
205         description
206           "value for 3.1.1";
207       }
208       enum 5.0 {
209         value 11;
210         description
211           "value for 5.0";
212       }
213       enum 5.1 {
214         value 12;
215         description
216           "value for 5.1";
217       }
218       enum 6.0 {
219         value 13;
220         description
221           "value for 6.0";
222       }
223       enum 6.1 {
224         value 14;
225         description
226           "value for 6.1";
227       }
228       enum 7.0 {
229         value 15;
230         description
231           "value for 7.0";
232       }
233       enum 7.1 {
234         value 16;
235         description
236           "value for 7.1";
237       }
238     }
239     description
240       "OpenROADM version enum type";
241   }
242
243   grouping rpc-response-status {
244     leaf status {
245       type rpc-status;
246       mandatory true;
247       description
248         "Successful or Failed";
249     }
250     leaf status-message {
251       type string;
252       description
253         "Gives a more detailed status";
254     }
255   }
256
257   grouping extended-rpc-response-status {
258     leaf status {
259       type extended-rpc-status;
260       mandatory true;
261       description
262         "Successful, Failed or In-progress";
263     }
264     leaf status-message {
265       type string;
266       description
267         "Gives a more detailed status.";
268     }
269   }
270
271   grouping eth-rate-and-burst-size {
272     description
273       "Grouping of ethernet committed rate and burst size.";
274     leaf committed-info-rate {
275       type uint32;
276       mandatory true;
277       description
278         "Committed Information Rate (CIR), unit in Mbps. For example, 1250 Mbps";
279     }
280     leaf committed-burst-size {
281       type uint16;
282       mandatory true;
283       description
284         "Committed Burst Size, unit in 1KB (K Byte).
285                 Range 16 | 32 | 64 | 128 | 512 | 1024. Default: 16";
286     }
287   }
288
289   identity otn-protection-type {
290     description
291       "OTN base protection identity from which
292          specific protection types are derived.";
293   }
294
295   typedef tcm-direction-capability-type {
296     type enumeration {
297       enum up-tcm {
298         description
299           "Port supports up TCM termination, e.g., direction facing the switch fabric";
300       }
301       enum down-tcm {
302         description
303           "Port supports down TCM termination, e.g., direction facing out of the equipment ";
304       }
305       enum up-down-tcm {
306         description
307           "Port supports both up and down TCM terminations";
308       }
309     }
310     description
311       "TCM direction capability for the port";
312   }
313
314
315
316
317
318
319   //
320   // Identities for FEC -- used for Device and Service models
321   //
322
323   // Base Identity
324   identity fec-identity {
325     description
326       "A unique FEC identification";
327   }
328
329   // FEC Off (duplications for backwards compatibility)
330   identity off-fec {
331     status deprecated;
332     base fec-identity;
333     description
334       "FEC Off";
335   }
336   identity off {
337     base fec-identity;
338     description
339       "FEC Off";
340   }
341
342   // Staircase FEC (duplications for backwards compatibility)
343   identity sc-fec {
344     status deprecated;
345     base fec-identity;
346     description
347       "Staircase FEC identification";
348   }
349   identity scfec {
350     base fec-identity;
351     description
352       "Staircase FEC identification";
353   }
354
355   // Reed Solomon FEC (duplication for backwards compatibility)
356   identity rs-fec {
357     status deprecated;
358     base fec-identity;
359     description
360       "Reed Solomon FEC identification";
361   }
362   identity rsfec {
363     base fec-identity;
364     description
365       "Reed Solomon FEC identification";
366   }
367
368   // OpenROADM FEC (duplication for backwards compatibility)
369   identity o-fec {
370     status deprecated;
371     base fec-identity;
372     description
373       "OpenROADM FEC identification";
374   }
375   identity ofec {
376     base fec-identity;
377     description
378       "OpenROADM FEC identification";
379   }
380
381   // G.975.1 I.4
382   identity efec {
383     base fec-identity;
384     description
385       "G.975.1 I.4";
386   }
387
388   // G.975.1 I.7
389   identity ufec {
390     base fec-identity;
391     description
392       "G.975.1 I.7";
393   }
394
395   // Soft Decision FEC
396   identity sdfec {
397     base fec-identity;
398     description
399       "Soft Decision FEC";
400   }
401
402   // Clariphy SDFEC
403   identity sdfeca1 {
404     base fec-identity;
405     description
406       "Clariphy SDFEC";
407   }
408
409   // SDFEC with SCFED
410   identity sdfecb1 {
411     base fec-identity;
412     description
413       "SDFEC with SCFEC";
414   }
415
416
417   grouping fec-grouping {
418     leaf fec {
419       type identityref {
420         base org-openroadm-common-types:fec-identity;
421       }
422       description
423         "FEC / Forward Error Correction";
424     }
425   }
426
427 }