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