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