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