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