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