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