clean test environment
[transportpce.git] / tests / honeynode / 2.2.1 / honeynode-plugin-api / src / main / yang / common / org-openroadm-common-types@2018-10-19.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       AT&T Intellectual Property.  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 2018-10-19 {
39     description
40       "Version 2.2.1";
41   }
42   revision 2017-12-15 {
43     description
44       "Version 2.2";
45   }
46   revision 2017-09-29 {
47     description
48       "Version 2.1";
49   }
50   revision 2017-06-26 {
51     description
52       "Version 2.0";
53   }
54   revision 2016-10-14 {
55     description
56       "Version 1.2";
57   }
58
59   identity och-rate-identity {
60     description
61       "A unique och rate identification";
62   }
63
64   identity R200G {
65     base och-rate-identity;
66     description
67       "Identity for 200G Rate";
68   }
69
70   identity R100G {
71     base och-rate-identity;
72     description
73       "Identity for 100G Rate";
74   }
75
76   identity R10.7G {
77     base och-rate-identity;
78     description
79       "Identity for 10.7G Rate";
80   }
81
82   identity R11.1G {
83     base och-rate-identity;
84     description
85       "Identity for 11.1G Rate";
86   }
87
88   typedef node-types {
89     type enumeration {
90       enum "rdm" {
91         value 1;
92       }
93       enum "xpdr" {
94         value 2;
95       }
96       enum "ila" {
97         value 3;
98       }
99       enum "extplug" {
100         value 4;
101       }
102     }
103     description
104       "Identifier for node type
105        1. rdm for ROADM
106        2. xpdr for Transponder, Regen
107        3. ila for in-line amplifier
108        4. extplug for external plugable";
109   }
110
111   typedef node-id-type {
112     type string {
113       length "7..63";
114       pattern "([a-zA-Z][a-zA-Z0-9-]{5,18}[a-zA-Z0-9])" {
115         error-message
116           "A node-id must be 7 to 63 characters in length.
117            A node-id can contain letters, numbers, and hyphens.
118            The first character must be a letter.
119            The last character must be a letter or number.";
120       }
121     }
122     description
123       "Globally unique identifer for a device.";
124   }
125
126   typedef xpdr-node-types {
127     type enumeration {
128       enum "tpdr" {
129         value 1;
130       }
131       enum "mpdr" {
132         value 2;
133       }
134       enum "switch" {
135         value 3;
136       }
137       enum "regen" {
138         value 4;
139       }
140       enum "regen-uni" {
141         value 5;
142       }
143     }
144     description
145       "Identifier for Xponder node type
146        1. Transponder
147        2. Muxponder
148        3. OTN switchponder
149        4. Regenerator
150        5. Regenerator based on unidirectional model";
151   }
152
153   typedef frequency-THz {
154     type decimal64 {
155       fraction-digits 8;
156     }
157     units "THz";
158     description
159       "Frequency value in THz.";
160   }
161
162   typedef frequency-GHz {
163     type decimal64 {
164       fraction-digits 5;
165     }
166     units "GHz";
167     description
168       "Frequency value in GHz.";
169   }
170
171   typedef power-dBm {
172     type decimal64 {
173       fraction-digits 2;
174     }
175     units "dBm";
176     description
177       "Power value in dBm.";
178   }
179
180   typedef ratio-dB {
181     type decimal64 {
182       fraction-digits 3;
183     }
184     units "dB";
185     description
186       "Power ratio in dB.";
187   }
188
189   typedef fiber-pmd {
190     type decimal64 {
191       fraction-digits 2;
192     }
193     units "ps/(km[1/2])";
194     description
195       "Polarization Mode Dispersion expressed in ps/km(1/2).";
196   }
197
198   typedef amplifier-types {
199     type enumeration {
200       enum "standard" {
201         value 1;
202       }
203     }
204     description
205       "identifier for amplifier type
206        1. standard for amplifier as defined initially in the ROADM MSA specifications
207        To be completed if/when additional amplifier types are required ";
208   }
209
210   typedef line-amplifier-control-mode {
211     type enumeration {
212       enum "gainLoss" {
213         value 2;
214       }
215       enum "off" {
216         value 3;
217       }
218     }
219     description
220       "Identifies the line amplifier control mode, either off or gain.";
221   }
222
223   typedef amplifier-gain-range {
224     type enumeration {
225       enum "gain-range-1" {
226         value 1;
227       }
228       enum "gain-range-2" {
229         value 2;
230       }
231       enum "gain-range-3" {
232         value 3;
233       }
234       enum "gain-range-4" {
235         value 4;
236       }
237     }
238     description
239       "Operational mode for the amplifier:  
240        this parameter allows modeling different operational modes (gain ranges) ,notably for switched-gain amplifiers.
241        It indicates which performance model shall be used by the path feasibility engine. 
242        For standard amplifier, or when performance evaluation is based on incremental noise, use gain-range-1.
243        When performance evaluation is based on advanced parameters, specify used gain-range (1 to 4).
244        Up to release 2.1, only gain-range-1 is to be used (default value) ";
245   }
246
247   typedef severity {
248     type enumeration {
249       enum "critical" {
250         value 1;
251       }
252       enum "major" {
253         value 2;
254       }
255       enum "minor" {
256         value 3;
257       }
258       enum "warning" {
259         value 4;
260       }
261       enum "clear" {
262         value 5;
263       }
264       enum "indeterminate" {
265         value 6;
266       }
267     }
268     description
269       "Severity, based on X.733 perceived severity";
270   }
271
272   typedef activate-notification-type {
273     type enumeration {
274       enum "activate" {
275         value 1;
276         description
277           "software or database activation";
278       }
279       enum "commit" {
280         value 2;
281         description
282           "commit the software or database. 
283            For software activate, this event can happen in the following scenarios:
284              1) immediately when user issue db-activate command without rollBackTimer
285                 or if the rollBackTimer is specified as 00-00-00;
286              2) when user issue cancel-rollback-timer before it expires and with accept=true.
287            For database activate, this event can occur in the following scenarios:
288              1) immediately when user issue db-activate command without rollBackTimer
289                 or if the rollBackTimer is specified as 00-00-00;
290              2) when user issue cancel-rollback-timer before it expires and with accept=true.";
291       }
292       enum "cancel" {
293         value 3;
294         description
295           "cancel the database or software activation operation.
296            For software activate, this event can happen in the following cases:
297              1) when the rollBackTimer expires;
298              2) when the user issues cancel-rollback-timer with accept=false.  
299            For database activate, this event can happen in the following cases:
300              1) when the rollBackTimer expires;
301              2) when the user issues cancel-rollback-timer with accept=false.";
302       }
303     }
304     description
305       "Type of notification on software or database activation events";
306   }
307
308   typedef rpc-status {
309     type enumeration {
310       enum "Successful" {
311         value 1;
312       }
313       enum "Failed" {
314         value 2;
315       }
316     }
317     description
318       "status of RPC ";
319   }
320
321   typedef extended-rpc-status {
322     type enumeration {
323       enum "Successful" {
324         value 1;
325       }
326       enum "Failed" {
327         value 2;
328       }
329       enum "In-progress" {
330         value 3;
331       }
332     }
333     description
334       "status of RPC ";
335   }
336
337   typedef openroadm-version-type {
338     type enumeration {
339       enum "1.0" {
340         value 1;
341         description
342           "value for 1.0";
343       }
344       enum "2.0" {
345         value 2;
346         description
347           "value for 2.0";
348       }
349       enum "2.1" {
350         value 3;
351         description
352           "value for 2.1";
353       }
354       enum "2.2" {
355         value 4;
356         description
357           "value for 2.2";
358       }
359       enum "2.2.1" {
360         value 8;
361         description
362           "value for 2.2";
363       }
364     }
365     description
366       "OpenROADM version enum type";
367   }
368
369   typedef lifecycle-state {
370     type enumeration {
371       enum "deployed" {
372         value 1;
373       }
374       enum "planned" {
375         value 2;
376       }
377       enum "maintenance" {
378         value 3;
379       }
380       enum "deploying" {
381         value 4;
382       }
383       enum "undeploying" {
384         value 5;
385       }
386       enum "undeployed" {
387         value 6;
388       }
389       enum "proposed" {
390         value 7;
391       }
392       enum "draft" {
393         value 8;
394       }
395       enum "deploy-failed" {
396         value 9;
397       }
398       enum "undeploy-failed" {
399         value 10;
400       }
401     }
402     description
403       "Lifecycle state.";
404   }
405
406   typedef state {
407     type enumeration {
408       enum "inService" {
409         value 1;
410       }
411       enum "outOfService" {
412         value 2;
413       }
414       enum "degraded" {
415         value 3;
416       }
417     }
418     description
419       "State that indicates whether the resource is able to provide fullfill its role - carry traffic, etc.";
420   }
421
422   typedef optic-types {
423     type enumeration {
424       enum "gray" {
425         value 1;
426       }
427       enum "dwdm" {
428         value 2;
429       }
430     }
431   }
432
433   typedef equipment-type-enum {
434     type enumeration {
435       enum "other" {
436         value 1;
437       }
438       enum "powerSupply" {
439         value 2;
440       }
441       enum "shelfProcessor" {
442         value 3;
443       }
444       enum "crossConnect" {
445         value 4;
446       }
447       enum "fan" {
448         value 5;
449       }
450       enum "accessPanel" {
451         value 6;
452       }
453       enum "circuitPack" {
454         value 7;
455       }
456     }
457   }
458
459   typedef optical-control-mode {
460     type enumeration {
461       enum "power" {
462         value 1;
463       }
464       enum "gainLoss" {
465         value 2;
466       }
467       enum "off" {
468         value 3;
469       }
470     }
471     description
472       "Optical Control Mode: identifies specific algorithm related to power management and general optical control.";
473     reference "openroadm.org: Open ROADM MSA Specification.";
474   }
475
476   typedef direction {
477     type enumeration {
478       enum "tx" {
479         value 1;
480       }
481       enum "rx" {
482         value 2;
483       }
484       enum "bidirectional" {
485         value 3;
486       }
487       enum "notApplicable" {
488         value 4;
489       }
490     }
491   }
492
493   typedef location {
494     type enumeration {
495       enum "notApplicable" {
496         value 1;
497       }
498       enum "nearEnd" {
499         value 2;
500       }
501       enum "farEnd" {
502         value 3;
503       }
504     }
505   }
506
507   typedef wavelength-duplication-type {
508     type enumeration {
509       enum "one-per-srg" {
510         value 1;
511         description
512           "The SRG cannot handle wavelength duplication. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will result in failure.";
513       }
514       enum "one-per-degree" {
515         value 2;
516         description
517           "The SRG can handle wavelength duplication, but only one per degree. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will succeed, so long as the connections are not using the same degree.";
518       }
519     }
520     description
521       "One per srg is applied to C/D add/drop group
522        one per degree is applied to C/D/C add drop group";
523   }
524
525   typedef port-qual {
526     type enumeration {
527       enum "roadm-internal" {
528         value 1;
529       }
530       enum "roadm-external" {
531         value 2;
532       }
533       enum "xpdr-network" {
534         value 3;
535       }
536       enum "xpdr-client" {
537         value 4;
538       }
539       enum "otdr" {
540         value 5;
541       }
542       enum "switch-network" {
543         value 6;
544       }
545       enum "switch-client" {
546         value 7;
547       }
548       enum "ila-external" {
549         value 8;
550       }
551       enum "ila-internal" {
552         value 9;
553       }
554     }
555   }
556
557   typedef modulation-format {
558     type enumeration {
559       enum "bpsk" {
560         value 0;
561         description
562           "binary phase-shift keying";
563       }
564       enum "dc-dp-bpsk" {
565         value 1;
566         description
567           "DC dual-polarization binary phase-shift keying";
568       }
569       enum "qpsk" {
570         value 2;
571         description
572           "quadrature phase-shift keying";
573       }
574       enum "dp-qpsk" {
575         value 3;
576         description
577           "dual-polarization binary phase-shift keying";
578       }
579       enum "qam16" {
580         value 4;
581         description
582           "quadrature amplitude modulation 16";
583       }
584       enum "dp-qam16" {
585         value 5;
586         description
587           "dual-polarization quadrature amplitude modulation 16";
588       }
589       enum "dc-dp-qam16" {
590         value 6;
591         description
592           "DC dual-polarization quadrature amplitude modulation 16";
593       }
594       enum "qam8" {
595         value 7;
596         description
597           "quadrature amplitude modulation 8";
598       }
599       enum "dp-qam8" {
600         value 8;
601         description
602           "dual-polarization quadrature amplitude modulation 8";
603       }
604       enum "dc-dp-qam8" {
605         value 9;
606         description
607           "DC dual-polarization quadrature amplitude modulation 8";
608       }
609     }
610     description
611       "Modulation format";
612   }
613
614   grouping physical-location {
615     leaf rack {
616       type string;
617       mandatory false;
618     }
619     leaf shelf {
620       type string;
621       mandatory false;
622     }
623     leaf slot {
624       type string;
625       mandatory false;
626     }
627     leaf subSlot {
628       type string;
629       mandatory false;
630     }
631   }
632
633   grouping rpc-response-status {
634     leaf status {
635       type rpc-status;
636       mandatory true;
637       description
638         "Successful or Failed";
639     }
640     leaf status-message {
641       type string;
642       description
643         "Gives a more detailed status";
644     }
645   }
646
647   grouping extended-rpc-response-status {
648     leaf status {
649       type extended-rpc-status;
650       mandatory true;
651       description
652         "Successful, Failed or In-progress";
653     }
654     leaf status-message {
655       type string;
656       description
657         "Gives a more detailed status.";
658     }
659   }
660
661   grouping equipment-type {
662     leaf type {
663       type equipment-type-enum;
664       config false;
665       mandatory true;
666     }
667     leaf extension {
668       type string;
669       config false;
670       mandatory false;
671       description
672         "Populated with equipment type when enum value is set to vendorExtension";
673     }
674   }
675 }