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