Upgrade openroadm service models to 10.1
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-common-types@2021-12-10.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 2021-12-10 {
39     description
40       "Version 10.1";
41   }
42   revision 2021-09-24 {
43     description
44       "Version 10.0";
45   }
46   revision 2021-05-28 {
47     description
48       "Version 9.1";
49   }
50   revision 2021-03-26 {
51     description
52       "Version 9.0";
53   }
54   revision 2020-12-11 {
55     description
56       "Version 8.1";
57   }
58   revision 2020-09-25 {
59     description
60       "Version 8.0";
61   }
62   revision 2020-05-29 {
63     description
64       "Version 7.1.0";
65   }
66   revision 2020-03-27 {
67     description
68       "Version 7.0.0";
69   }
70   revision 2019-11-29 {
71     description
72       "Version 6.1.0";
73   }
74   revision 2019-09-27 {
75     description
76       "Version 6.0.0";
77   }
78   revision 2019-05-31 {
79     description
80       "Version 5.1.0";
81   }
82   revision 2019-03-29 {
83     description
84       "Version 5.0.0";
85   }
86   revision 2018-11-30 {
87     description
88       "Version 4.1.0";
89   }
90   revision 2018-09-28 {
91     description
92       "Version 4.0.0";
93   }
94   revision 2018-03-30 {
95     description
96       "Version 3.0.0";
97   }
98   revision 2017-12-15 {
99     description
100       "Version 2.2";
101   }
102   revision 2017-09-29 {
103     description
104       "Version 2.1";
105   }
106   revision 2017-06-26 {
107     description
108       "Version 2.0";
109   }
110   revision 2016-10-14 {
111     description
112       "Version 1.2";
113   }
114
115   typedef activate-notification-type {
116     type enumeration {
117       enum activate {
118         value 1;
119         description
120           "software or database activation";
121       }
122       enum commit {
123         value 2;
124         description
125           "commit the software or database.
126            For software activate, this event can happen in the following scenarios:
127              1) immediately when user issue sw-activate command without validationTimer
128                 or if the validationTimer is specified as 00-00-00;
129              2) when user issue cancel-validation-timer before it expires and with accept=true.
130            For database activate, this event can occur in the following scenarios:
131              1) immediately when user issue db-activate command without rollBackTimer
132                 or if the rollBackTimer is specified as 00-00-00;
133              2) when user issue cancel-rollback-timer before it expires and with accept=true.";
134       }
135       enum cancel {
136         value 3;
137         description
138           "cancel the database or software activation operation.
139            For software activate, this event can happen in the following cases:
140              1) when the validationTimer expires;
141              2) when the user issues cancel-validation-timer with accept=false.
142            For database activate, this event can happen in the following cases:
143              1) when the rollBackTimer expires;
144              2) when the user issues cancel-rollback-timer with accept=false.";
145       }
146     }
147     description
148       "Type of notification on software or database activation events";
149   }
150
151   typedef rpc-status {
152     type enumeration {
153       enum Successful {
154         value 1;
155       }
156       enum Failed {
157         value 2;
158       }
159     }
160     description
161       "status of RPC ";
162   }
163
164   typedef extended-rpc-status {
165     type enumeration {
166       enum Successful {
167         value 1;
168       }
169       enum Failed {
170         value 2;
171       }
172       enum In-progress {
173         value 3;
174       }
175     }
176     description
177       "status of RPC ";
178   }
179
180   typedef openroadm-version-type {
181     type enumeration {
182       enum 1.0 {
183         value 1;
184         description
185           "value for 1.0";
186       }
187       enum 2.0 {
188         value 2;
189         description
190           "value for 2.0";
191       }
192       enum 2.1 {
193         value 3;
194         description
195           "value for 2.1";
196       }
197       enum 2.2 {
198         value 4;
199         description
200           "value for 2.2";
201       }
202       enum 3.0 {
203         value 5;
204         description
205           "value for 3.0";
206       }
207       enum 3.1 {
208         value 6;
209         description
210           "value for 3.1";
211       }
212       enum 4.0 {
213         value 7;
214         description
215           "value for 4.0";
216       }
217       enum 2.2.1 {
218         value 8;
219         description
220           "value for 2.2.1";
221       }
222       enum 4.1 {
223         value 9;
224         description
225           "value for 4.1";
226       }
227       enum 3.1.1 {
228         value 10;
229         description
230           "value for 3.1.1";
231       }
232       enum 5.0 {
233         value 11;
234         description
235           "value for 5.0";
236       }
237       enum 5.1 {
238         value 12;
239         description
240           "value for 5.1";
241       }
242       enum 6.0 {
243         value 13;
244         description
245           "value for 6.0";
246       }
247       enum 6.1 {
248         value 14;
249         description
250           "value for 6.1";
251       }
252       enum 7.0 {
253         value 15;
254         description
255           "value for 7.0";
256       }
257       enum 7.1 {
258         value 16;
259         description
260           "value for 7.1";
261       }
262       enum 8.0 {
263         value 17;
264         description
265           "value for 8.0";
266       }
267       enum 8.1 {
268         value 18;
269         description
270           "value for 8.1";
271       }
272       enum 9.0 {
273         value 19;
274         description
275           "value for 9.0";
276       }
277       enum 9.1 {
278         value 20;
279         description
280           "value for 9.1";
281       }
282       enum 10.0 {
283         value 21;
284         description
285           "value for 10.0";
286       }
287       enum 10.1 {
288         value 22;
289         description
290           "value for 10.1";
291       }
292     }
293     description
294       "OpenROADM version enum type";
295   }
296
297   grouping rpc-response-status {
298     leaf status {
299       type rpc-status;
300       mandatory true;
301       description
302         "Successful or Failed";
303     }
304     leaf status-message {
305       type string;
306       description
307         "Gives a more detailed status";
308     }
309   }
310
311   grouping extended-rpc-response-status {
312     leaf status {
313       type extended-rpc-status;
314       mandatory true;
315       description
316         "Successful, Failed or In-progress";
317     }
318     leaf status-message {
319       type string;
320       description
321         "Gives a more detailed status.";
322     }
323   }
324
325   grouping eth-rate-and-burst-size {
326     description
327       "Grouping of ethernet committed rate and burst size.";
328     leaf committed-info-rate {
329       type uint32;
330       mandatory true;
331       description
332         "Committed Information Rate (CIR), unit in Mbps. For example, 1250 Mbps";
333     }
334     leaf committed-burst-size {
335       type uint16;
336       mandatory true;
337       description
338         "Committed Burst Size, unit in 1KB (K Byte).
339                 Range 16 | 32 | 64 | 128 | 512 | 1024. Default: 16";
340     }
341   }
342
343   identity otn-protection-type {
344     description
345       "OTN base protection identity from which
346          specific protection types are derived.";
347   }
348
349   typedef tcm-direction-capability-type {
350     type enumeration {
351       enum up-tcm {
352         description
353           "Port supports up TCM termination, e.g., direction facing the switch fabric";
354       }
355       enum down-tcm {
356         description
357           "Port supports down TCM termination, e.g., direction facing out of the equipment ";
358       }
359       enum up-down-tcm {
360         description
361           "Port supports both up and down TCM terminations";
362       }
363     }
364     description
365       "TCM direction capability for the port";
366   }
367
368
369
370
371
372
373   //
374   // Identities for FEC -- used for Device and Service models
375   //
376
377   // Base Identity
378   identity fec-identity {
379     description
380       "A unique FEC identification";
381   }
382
383   // FEC Off (duplications for backwards compatibility)
384   identity off-fec {
385     status deprecated;
386     base fec-identity;
387     description
388       "FEC Off";
389   }
390   identity off {
391     base fec-identity;
392     description
393       "FEC Off";
394   }
395   identity scfec {
396     base fec-identity;
397     description
398       "Staircase FEC identification";
399   }
400   identity rsfec {
401     base fec-identity;
402     description
403       "Reed Solomon FEC identification";
404   }
405   identity ofec {
406     base fec-identity;
407     description
408       "OpenROADM FEC identification";
409   }
410
411   // G.975.1 I.4
412   identity efec {
413     base fec-identity;
414     description
415       "G.975.1 I.4";
416   }
417
418   // G.975.1 I.7
419   identity ufec {
420     base fec-identity;
421     description
422       "G.975.1 I.7";
423   }
424
425   // Soft Decision FEC
426   identity sdfec {
427     base fec-identity;
428     description
429       "Soft Decision FEC";
430   }
431
432   // Clariphy SDFEC
433   identity sdfeca1 {
434     base fec-identity;
435     description
436       "Clariphy SDFEC";
437   }
438
439   // SDFEC with SCFED
440   identity sdfecb1 {
441     base fec-identity;
442     description
443       "SDFEC with SCFEC";
444   }
445
446   // Base-R
447   identity baser {
448     base fec-identity;
449     description
450       "Base-R (IEEE 802.3)";
451   }
452
453   grouping fec-grouping {
454     leaf fec {
455       type identityref {
456         base org-openroadm-common-types:fec-identity;
457       }
458       description
459         "FEC / Forward Error Correction";
460     }
461   }
462
463   typedef SRLG-type {
464     type enumeration {
465       enum site {
466         value 0;
467         description
468           "Site SRLG";
469       }
470       enum node {
471         value 1;
472         description
473           "Node SRLG";
474       }
475       enum srlg {
476         value 2;
477         description
478           "SRLG here is also referred as fiber SRLG";
479       }
480       enum link {
481         value 3;
482         description
483           "Link SRLG";
484       }    
485     }
486   }  
487 }