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