Merge "Fix Log message in OLM provider"
[transportpce.git] / api / src / main / yang / service_path / transportpce-common-types@2021-06-18.yang
1 module transportpce-common-types {
2   namespace "http://org/transportpce/common-types";
3   prefix org-transportpce-common-types;
4
5   import org-openroadm-resource-types {
6     prefix org-openroadm-resource-types;
7     revision-date 2016-10-14;
8   }
9   import org-openroadm-pm-types {
10     prefix org-openroadm-pm-types;
11     revision-date 2016-10-14;
12   }
13   import org-openroadm-common-types {
14     prefix org-openroadm-common-types;
15     revision-date 2018-10-19;
16   }
17
18   revision 2021-06-18 {
19     description
20       "Replace olm-renderer-input by optical-rendrer-input.
21        Create optical-renderer-nodes and otn-renderer-nodes groupings";
22   }
23   revision 2020-12-11 {
24     description
25       "Update grouping olm-renderer-input, adding min, max frequencies
26        lower spectral slot number and higher spectral slot number
27        fix center-freq unit";
28   }
29   revision 2020-06-15 {
30     description
31       "Updated grouping olm-renderer-input to enable support for flex-grid";
32   }
33   revision 2020-01-28 {
34     description
35       "Add necessary parameters to consolidate OTN and address ONAP
36        MDONS use case, including grouping otn-renderer-input";
37   }
38   revision 2019-12-12 {
39     description
40       "Add grouping otn-renderer-input";
41   }
42   revision 2017-09-07 {
43     description
44       "Initial revision of TransportPCE common-types";
45   }
46
47   typedef pm-names-enum {
48     type enumeration {
49       enum vendorExtension {
50         value 1;
51         description
52           "vendor extension";
53       }
54       enum bitErrorRate {
55         value 2;
56         description
57           "Bit error rate (BER)";
58       }
59       enum opticalPowerOutput {
60         value 3;
61         description
62           "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
63       }
64       enum opticalReturnLoss {
65         value 4;
66         description
67           "Optical Return Loss (ORL-OTS) - at MW port(s) B";
68       }
69       enum opticalPowerInput {
70         value 5;
71         description
72           "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power";
73       }
74       enum codeViolations {
75         value 8;
76         description
77           "Code Violations (CV)";
78       }
79       enum erroredSeconds {
80         value 9;
81         description
82           "Errored Seconds (ES)";
83       }
84       enum severelyErroredSeconds {
85         value 10;
86         description
87           "Severely Errored Seconds (SES)";
88       }
89       enum unavailableSeconds {
90         value 11;
91         description
92           "Unavailable Seconds (UAS)";
93       }
94       enum inFrames {
95         value 12;
96         description
97           "In frames (INFRAMES-E)";
98       }
99       enum inFramesErrored {
100         value 13;
101         description
102           "In frames errored (INFRAMESERR-E)";
103       }
104       enum outFrames {
105         value 14;
106         description
107           "Out frames (OUTFRAMES-E)";
108       }
109       enum erroredSecondsEthernet {
110         value 15;
111         description
112           "Errored Seconds Ethernet (ES-E)";
113       }
114       enum severelyErroredSecondsEthernet {
115         value 16;
116         description
117           "Severly Errored Seconds, Ethernet (SES-E)";
118       }
119       enum unavailableSecondsEthernet {
120         value 17;
121         description
122           "Unavailable Seconds, Ethernet (UAS-E)";
123       }
124       enum erroredBlockCount {
125         value 18;
126         description
127           "Errored block count";
128       }
129       enum delay {
130         value 19;
131         description
132           "Number of frames between a DMValue toggle event and the received DMp signal value toggle event";
133       }
134       enum defectSeconds {
135         value 20;
136         description
137           "Defect Seconds (DS)";
138       }
139       enum backwardIncomingAlignmentError {
140         value 21;
141         description
142           "Backward Incoming Alignment Error (BIAE)";
143       }
144       enum incomingAlignmentError {
145         value 22;
146         description
147           "Incoming Alignment Error (IAE)";
148       }
149       enum opticalPowerOutputMin {
150         value 23;
151         description
152           "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
153       }
154       enum opticalPowerOutputMax {
155         value 24;
156         description
157           "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
158       }
159       enum opticalPowerOutputAvg {
160         value 25;
161         description
162           "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
163       }
164       enum opticalPowerInputMin {
165         value 26;
166         description
167           "Minimum Optical Power Input (OPIN-OTS). Total optical power";
168       }
169       enum opticalPowerInputMax {
170         value 27;
171         description
172           "Maximum Optical Power Input (OPIN-OTS). Total optical power";
173       }
174       enum opticalPowerInputAvg {
175         value 28;
176         description
177           "Average Optical Power Input (OPIN-OTS). Total optical power";
178       }
179       enum opticalPowerOutputOSC {
180         value 29;
181         description
182           "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
183       }
184       enum opticalPowerOutputOSCMin {
185         value 30;
186         description
187           "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
188       }
189       enum opticalPowerOutputOSCMax {
190         value 31;
191         description
192           "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
193       }
194       enum opticalPowerOutputOSCAvg {
195         value 32;
196         description
197           "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
198       }
199       enum opticalPowerInputOSC {
200         value 33;
201         description
202           "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
203       }
204       enum opticalPowerInputOSCMin {
205         value 34;
206         description
207           "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
208       }
209       enum opticalPowerInputOSCMax {
210         value 35;
211         description
212           "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
213       }
214       enum opticalPowerInputOSCAvg {
215         value 36;
216         description
217           "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
218       }
219       enum preFECCorrectedErrors {
220         value 37;
221         description
222           "pFEC corrected Errors";
223       }
224       enum totalOpticalPowerInput {
225         value 38;
226         description
227           "Total Optical Power Input.";
228       }
229       enum totalOpticalPowerInputMin {
230         value 39;
231         description
232           "Minumun Total Optical Power Input.";
233       }
234       enum totalOpticalPowerInputMax {
235         value 40;
236         description
237           "Maximum Total Optical Power Input.";
238       }
239       enum totalOpticalPowerInputAvg {
240         value 41;
241         description
242           "Average Total Optical Power Input.";
243       }
244       enum FECCorrectableBlocks {
245         value 42;
246         description
247           "FEC Correctable Blocks.";
248       }
249       enum FECUncorrectableBlocks {
250         value 43;
251         description
252           "FEC Uncorrectable Blocks.";
253       }
254       enum BIPErrorCounter {
255         value 56;
256         description
257           "BIP Error Counter";
258       }
259       enum protectionSwitchingCount {
260         value 57;
261         description
262           "Protection Switching Count (PSC)";
263       }
264       enum protectionSwitchingDuration {
265         value 58;
266         description
267           "Protection Switching Duration in seconds (PSD)";
268       }
269       enum erroredBlockCountTCM1-up {
270         value 59;
271         description
272           "errored Blocks Count on TCM1 up direction.";
273       }
274       enum erroredBlockCountTCM2-up {
275         value 60;
276         description
277           "errored Blocks Count on TCM2 up direction.";
278       }
279       enum erroredBlockCountTCM3-up {
280         value 61;
281         description
282           "errored Blocks Count on TCM3 up direction.";
283       }
284       enum erroredBlockCountTCM4-up {
285         value 62;
286         description
287           "errored Blocks Count on TCM4 up direction.";
288       }
289       enum erroredBlockCountTCM5-up {
290         value 63;
291         description
292           "errored Blocks Count on TCM5 up direction.";
293       }
294       enum erroredBlockCountTCM6-up {
295         value 64;
296         description
297           "errored Blocks Count on TCM6 up direction.";
298       }
299       enum delayTCM1-up {
300         value 65;
301         description
302           "Delay on TCM1 up direction.";
303       }
304       enum delayTCM2-up {
305         value 66;
306         description
307           "Delay on TCM2 up direction.";
308       }
309       enum delayTCM3-up {
310         value 67;
311         description
312           "Delay on TCM3 up direction.";
313       }
314       enum delayTCM4-up {
315         value 68;
316         description
317           "Delay on TCM4 up direction.";
318       }
319       enum delayTCM5-up {
320         value 69;
321         description
322           "Delay on TCM5 up direction.";
323       }
324       enum delayTCM6-up {
325         value 70;
326         description
327           "Delay on TCM6 up direction.";
328       }
329       enum erroredBlockCountTCM1-down {
330         value 71;
331         description
332           "errored Blocks Count on TCM1 down direction.";
333       }
334       enum erroredBlockCountTCM2-down {
335         value 72;
336         description
337           "errored Blocks Count on TCM2 down direction.";
338       }
339       enum erroredBlockCountTCM3-down {
340         value 73;
341         description
342           "errored Blocks Count on TCM3 down direction.";
343       }
344       enum erroredBlockCountTCM4-down {
345         value 74;
346         description
347           "errored Blocks Count on TCM4 down direction.";
348       }
349       enum erroredBlockCountTCM5-down {
350         value 75;
351         description
352           "errored Blocks Count on TCM5 down direction.";
353       }
354       enum erroredBlockCountTCM6-down {
355         value 76;
356         description
357           "errored Blocks Count on TCM6 down direction.";
358       }
359       enum delayTCM1-down {
360         value 77;
361         description
362           "Delay on TCM1 down direction.";
363       }
364       enum delayTCM2-down {
365         value 78;
366         description
367           "Delay on TCM2 down direction.";
368       }
369       enum delayTCM3-down {
370         value 79;
371         description
372           "Delay on TCM3 down direction.";
373       }
374       enum delayTCM4-down {
375         value 80;
376         description
377           "Delay on TCM4 down direction.";
378       }
379       enum delayTCM5-down {
380         value 81;
381         description
382           "Delay on TCM5 down direction.";
383       }
384       enum delayTCM6-down {
385         value 82;
386         description
387           "Delay on TCM6 down direction.";
388       }
389     }
390   }
391
392   typedef location {
393     type enumeration {
394       enum notApplicable {
395         value 1;
396       }
397       enum nearEnd {
398         value 2;
399       }
400       enum farEnd {
401         value 3;
402       }
403     }
404   }
405
406   typedef direction {
407     type enumeration {
408       enum tx {
409         value 1;
410       }
411       enum rx {
412         value 2;
413       }
414       enum bidirectional {
415         value 3;
416       }
417       enum notApplicable {
418         value 4;
419       }
420     }
421   }
422
423   grouping link-tp {
424     list link-tp {
425       leaf node-id {
426         type string;
427       }
428       leaf tp-id {
429         type string;
430       }
431     }
432   }
433
434   grouping optical-renderer-nodes {
435     list nodes {
436       key "node-id";
437       ordered-by user;
438       leaf node-id {
439         type string;
440         description
441           "Gloabally unique identifier for the node";
442       }
443       leaf src-tp {
444         type string;
445         mandatory true;
446         description
447           "Source termination point ";
448       }
449       leaf dest-tp {
450         type string;
451         mandatory true;
452         description
453           "Destination termination point ";
454       }
455     }
456   }
457
458   grouping otn-renderer-nodes {
459     list nodes {
460       key "node-id";
461       ordered-by user;
462       leaf node-id {
463         type string;
464         description
465           "Globally unique identifier for the node";
466       }
467       leaf network-tp {
468         type string;
469         description
470           "Source termination point ";
471       }
472       leaf client-tp {
473         type string;
474         description
475           "Destination termination point for end nodes";
476       }
477       leaf network2-tp {
478         type string;
479         description
480           "Destination termination point for intermediate switch";
481       }
482     }
483   }
484
485   grouping optical-renderer-input {
486     description
487       "Type to be used by OLM and Renderer RPCs";
488     leaf service-name {
489       type string;
490     }
491     leaf wave-number {
492       type uint32;
493     }
494     leaf center-freq {
495       type org-openroadm-common-types:frequency-THz;
496     }
497     leaf width {
498       description
499        " Width of nmc";
500       type org-openroadm-common-types:frequency-GHz;
501     }
502     leaf min-freq {
503       type org-openroadm-common-types:frequency-THz;
504     }
505     leaf max-freq {
506       type org-openroadm-common-types:frequency-THz;
507     }
508     leaf lower-spectral-slot-number {
509       type uint32;
510     }
511     leaf higher-spectral-slot-number {
512       type uint32;
513     }
514     uses optical-renderer-nodes;
515     uses node-interfaces;
516   }
517
518   grouping otn-renderer-input {
519     description
520       "Type to be used by OLM and Renderer RPCs for OTN";
521     leaf service-name {
522       type string;
523     }
524     uses otn-renderer-nodes;
525   }
526
527   grouping olm-get-pm-input {
528     leaf node-id {
529       type string;
530       mandatory true;
531       description
532         "Gloabally unique identifier
533          for the node";
534     }
535     leaf resource-type {
536       type org-openroadm-resource-types:resource-type-enum;
537       mandatory true;
538       description
539         "Type of the PM resource";
540     }
541     container resource-identifier {
542       leaf resource-name {
543         type string;
544         mandatory true;
545         description
546           "Identifier of particular resource of given type";
547       }
548       leaf circuit-pack-name {
549         when "../../resource-type = 'port'";
550         type string;
551         mandatory true;
552         description
553           "In case resource type is port, then particular resource is identified by port-name
554            (resource-name) and circuit-pack-name (this leaf).";
555       }
556     }
557     leaf granularity {
558       type org-openroadm-pm-types:pm-granularity;
559       mandatory true;
560       description
561         "Granularity of PM bin can be
562          notApplicable,15min,24Hour";
563     }
564     leaf pm-name-type {
565       type pm-names-enum;
566     }
567     leaf pm-extension {
568       type string;
569     }
570     leaf location {
571       type location;
572     }
573     leaf direction {
574       type direction;
575     }
576   }
577
578   grouping node-interfaces {
579     list node-interface {
580       key "node-id";
581       leaf node-id {
582         type string;
583       }
584       leaf-list och-interface-id {
585         type string;
586       }
587       leaf-list otu-interface-id {
588         type string;
589       }
590       leaf-list odu-interface-id {
591         type string;
592       }
593       leaf-list eth-interface-id {
594         type string;
595       }
596       leaf-list connection-id {
597         type string;
598       }
599     }
600   }
601
602   grouping otn-constraint {
603     container otn-constraints {
604       leaf trib-port-number {
605         type uint16;
606         description
607           "defines a trib-port that must be used at A or Z end";
608       }
609       leaf-list opu-trib-slots {
610         type uint16;
611         description
612           "defines a list of trib-slots that must be used at A or Z end";
613       }
614       leaf-list opucn-trib-slots {
615         type string;
616         description
617           "defines a list of opucn-trib-slots that must be used at A or
618            Z end";
619       }
620       container imposed-api {
621         description
622           "defines constraints on access point identifier to be used by
623            local device when one end point of the path (service) is located
624            in a remote domain not handled by the controller. These parameters
625            are passed to the local controller (transportpce) for interoperability
626            purposes.
627            SAPI : The source api (local domain) to be used by A
628            or Z end as expected by remote controller.
629            DAPI: defines the destination api (remote domain) to be used by A
630            or Z end as exposed in the remote domain. Used when the end of the path
631            is in an external domain, handled by a remote controller.
632            EXPECTED-SAPI : The api of the remote end of the path (in an external
633            domain) as expected to be received by A or Z end.
634            EXPECTED-DAPI : defines the destination api to be used by remote end
635            as exposed in the local domain. Used when the end of the path is in an
636            external domain, handled by a remote controller";
637         uses api-info;
638       }
639     }
640   }
641
642   grouping api-info {
643     leaf sapi {
644       type string;
645       description
646         "The source api used by the node";
647     }
648     leaf dapi {
649       type string;
650       description
651         "the destination api of the other end of the path";
652     }
653     leaf expected-sapi {
654       type string;
655       description
656         "The api of the remote end of the path as expected to be received
657          by the node";
658     }
659     leaf expected-dapi {
660       type string;
661       description
662         "api of the node itself, supposed to be used by remote end as
663          the destination";
664     }
665   }
666 }