Adapt PCE code for OTN services
[transportpce.git] / api / src / main / yang / service_path / transportpce-common-types@2017-09-07.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
14     revision "2017-09-07" {
15         description "Initial revision of TransportPCE common-types";
16     }
17
18     grouping olm-renderer-input {
19         leaf service-name {
20             type string;
21         }
22         leaf wave-number {
23             type uint32;
24         }
25         list nodes {
26             ordered-by user;
27             key "node-id";
28             leaf node-id {
29                 type string;
30                 description "Gloabally unique identifier
31                     for the node";
32             }
33             leaf src-tp {
34                 type string;
35                 description "Source termination point ";
36                 mandatory true;
37             }
38             leaf dest-tp {
39                 type string;
40                 description "Destination termination point ";
41                 mandatory true;
42             }
43         }
44         description
45             "Type to be used by OLM and Renderer RPCs";
46     }
47
48     grouping olm-get-pm-input {
49         leaf node-id {
50             type string;
51             description "Gloabally unique identifier
52                 for the node";
53             mandatory true;
54         }
55         leaf resource-type {
56             type org-openroadm-resource-types:resource-type-enum;
57             description "Type of the PM resource";
58             mandatory true;
59         }
60         container resource-identifier {
61             leaf resource-name {
62                 type string;
63                 description "Identifier of particular resource of given type";
64                 mandatory true;
65             }
66             leaf circuit-pack-name {
67                 when "../../resource-type = 'port'";
68                 type string;
69                 description "In case resource type is port, then particular resource is identified by port-name
70                     (resource-name) and circuit-pack-name (this leaf).";
71                 mandatory true;
72
73             }
74         }
75         leaf granularity {
76             type org-openroadm-pm-types:pm-granularity;
77             description "Granularity of PM bin can be
78                 notApplicable,15min,24Hour";
79             mandatory true;
80         }
81         leaf pm-name-type {
82             type pm-names-enum;
83         }
84         leaf pm-extension {
85             type string;
86         }
87         leaf location {
88             type location;
89         }
90         leaf direction {
91             type direction;
92         }
93     }
94
95     grouping node-interfaces {
96         list node-interface {
97             key node-id;
98             leaf node-id {
99                 type string;
100             }
101             leaf-list och-interface-id {
102                 type string;
103             }
104             leaf-list otu-interface-id {
105                 type string;
106             }
107             leaf-list odu-interface-id {
108                 type string;
109             }
110             leaf-list eth-interface-id {
111                 type string;
112             }
113             leaf-list connection-id {
114                 type string;
115             }
116         }
117    }
118
119        typedef pm-names-enum {
120            type enumeration {
121              enum "vendorExtension" {
122                value 1;
123                description
124                  "vendor extension";
125              }
126              enum "bitErrorRate" {
127                value 2;
128                description
129                  "Bit error rate (BER)";
130              }
131              enum "opticalPowerOutput" {
132                value 3;
133                description
134                  "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
135              }
136              enum "opticalReturnLoss" {
137                value 4;
138                description
139                  "Optical Return Loss (ORL-OTS) - at MW port(s) B";
140              }
141              enum "opticalPowerInput" {
142                value 5;
143                description
144                  "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power";
145              }
146              enum "codeViolations" {
147                value 8;
148                description
149                  "Code Violations (CV)";
150              }
151              enum "erroredSeconds" {
152                value 9;
153                description
154                  "Errored Seconds (ES)";
155              }
156              enum "severelyErroredSeconds" {
157                value 10;
158                description
159                  "Severely Errored Seconds (SES)";
160              }
161              enum "unavailableSeconds" {
162                value 11;
163                description
164                  "Unavailable Seconds (UAS)";
165              }
166              enum "inFrames" {
167                value 12;
168                description
169                  "In frames (INFRAMES-E)";
170              }
171              enum "inFramesErrored" {
172                value 13;
173                description
174                  "In frames errored (INFRAMESERR-E)";
175              }
176              enum "outFrames" {
177                value 14;
178                description
179                  "Out frames (OUTFRAMES-E)";
180              }
181              enum "erroredSecondsEthernet" {
182                value 15;
183                description
184                  "Errored Seconds Ethernet (ES-E)";
185              }
186              enum "severelyErroredSecondsEthernet" {
187                value 16;
188                description
189                  "Severly Errored Seconds, Ethernet (SES-E)";
190              }
191              enum "unavailableSecondsEthernet" {
192                value 17;
193                description
194                  "Unavailable Seconds, Ethernet (UAS-E)";
195              }
196              enum "erroredBlockCount" {
197                value 18;
198                description
199                  "Errored block count";
200              }
201              enum "delay" {
202                value 19;
203                description
204                  "Number of frames between a DMValue toggle event and the received DMp signal value toggle event";
205              }
206              enum "defectSeconds" {
207                value 20;
208                description
209                  "Defect Seconds (DS)";
210              }
211              enum "backwardIncomingAlignmentError" {
212                value 21;
213                description
214                  "Backward Incoming Alignment Error (BIAE)";
215              }
216              enum "incomingAlignmentError" {
217                value 22;
218                description
219                  "Incoming Alignment Error (IAE)";
220              }
221              enum "opticalPowerOutputMin" {
222                value 23;
223                description
224                  "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
225              }
226              enum "opticalPowerOutputMax" {
227                value 24;
228                description
229                  "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
230              }
231              enum "opticalPowerOutputAvg" {
232                value 25;
233                description
234                  "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
235              }
236              enum "opticalPowerInputMin" {
237                value 26;
238                description
239                  "Minimum Optical Power Input (OPIN-OTS). Total optical power";
240              }
241              enum "opticalPowerInputMax" {
242                value 27;
243                description
244                  "Maximum Optical Power Input (OPIN-OTS). Total optical power";
245              }
246              enum "opticalPowerInputAvg" {
247                value 28;
248                description
249                  "Average Optical Power Input (OPIN-OTS). Total optical power";
250              }
251              enum "opticalPowerOutputOSC" {
252                value 29;
253                description
254                  "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
255              }
256              enum "opticalPowerOutputOSCMin" {
257                value 30;
258                description
259                  "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
260              }
261              enum "opticalPowerOutputOSCMax" {
262                value 31;
263                description
264                  "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
265              }
266              enum "opticalPowerOutputOSCAvg" {
267                value 32;
268                description
269                  "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
270              }
271              enum "opticalPowerInputOSC" {
272                value 33;
273                description
274                  "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
275              }
276              enum "opticalPowerInputOSCMin" {
277                value 34;
278                description
279                  "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
280              }
281              enum "opticalPowerInputOSCMax" {
282                value 35;
283                description
284                  "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
285              }
286              enum "opticalPowerInputOSCAvg" {
287                value 36;
288                description
289                  "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
290              }
291              enum "preFECCorrectedErrors" {
292                value 37;
293                description
294                  "pFEC corrected Errors";
295              }
296              enum "totalOpticalPowerInput" {
297                value 38;
298                description
299                  "Total Optical Power Input.";
300              }
301              enum "totalOpticalPowerInputMin" {
302                value 39;
303                description
304                  "Minumun Total Optical Power Input.";
305              }
306              enum "totalOpticalPowerInputMax" {
307                value 40;
308                description
309                  "Maximum Total Optical Power Input.";
310              }
311              enum "totalOpticalPowerInputAvg" {
312                value 41;
313                description
314                  "Average Total Optical Power Input.";
315              }
316              enum "FECCorrectableBlocks" {
317                value 42;
318                description
319                  "FEC Correctable Blocks.";
320              }
321              enum "FECUncorrectableBlocks" {
322                value 43;
323                description
324                  "FEC Uncorrectable Blocks.";
325              }
326              enum "BIPErrorCounter" {
327                value 56;
328                description
329                  "BIP Error Counter";
330              }
331              enum "protectionSwitchingCount" {
332                value 57;
333                description
334                  "Protection Switching Count (PSC)";
335              }
336              enum "protectionSwitchingDuration" {
337                value 58;
338                description
339                  "Protection Switching Duration in seconds (PSD)";
340              }
341              enum "erroredBlockCountTCM1-up" {
342                value 59;
343                description
344                  "errored Blocks Count on TCM1 up direction.";
345              }
346              enum "erroredBlockCountTCM2-up" {
347                value 60;
348                description
349                  "errored Blocks Count on TCM2 up direction.";
350              }
351              enum "erroredBlockCountTCM3-up" {
352                value 61;
353                description
354                  "errored Blocks Count on TCM3 up direction.";
355              }
356              enum "erroredBlockCountTCM4-up" {
357                value 62;
358                description
359                  "errored Blocks Count on TCM4 up direction.";
360              }
361              enum "erroredBlockCountTCM5-up" {
362                value 63;
363                description
364                  "errored Blocks Count on TCM5 up direction.";
365              }
366              enum "erroredBlockCountTCM6-up" {
367                value 64;
368                description
369                  "errored Blocks Count on TCM6 up direction.";
370              }
371              enum "delayTCM1-up" {
372                value 65;
373                description
374                  "Delay on TCM1 up direction.";
375              }
376              enum "delayTCM2-up" {
377                value 66;
378                description
379                  "Delay on TCM2 up direction.";
380              }
381              enum "delayTCM3-up" {
382                value 67;
383                description
384                  "Delay on TCM3 up direction.";
385              }
386              enum "delayTCM4-up" {
387                value 68;
388                description
389                  "Delay on TCM4 up direction.";
390              }
391              enum "delayTCM5-up" {
392                value 69;
393                description
394                  "Delay on TCM5 up direction.";
395              }
396              enum "delayTCM6-up" {
397                value 70;
398                description
399                  "Delay on TCM6 up direction.";
400              }
401              enum "erroredBlockCountTCM1-down" {
402                value 71;
403                description
404                  "errored Blocks Count on TCM1 down direction.";
405              }
406              enum "erroredBlockCountTCM2-down" {
407                value 72;
408                description
409                  "errored Blocks Count on TCM2 down direction.";
410              }
411              enum "erroredBlockCountTCM3-down" {
412                value 73;
413                description
414                  "errored Blocks Count on TCM3 down direction.";
415              }
416              enum "erroredBlockCountTCM4-down" {
417                value 74;
418                description
419                  "errored Blocks Count on TCM4 down direction.";
420              }
421              enum "erroredBlockCountTCM5-down" {
422                value 75;
423                description
424                  "errored Blocks Count on TCM5 down direction.";
425              }
426              enum "erroredBlockCountTCM6-down" {
427                value 76;
428                description
429                  "errored Blocks Count on TCM6 down direction.";
430              }
431              enum "delayTCM1-down" {
432                value 77;
433                description
434                  "Delay on TCM1 down direction.";
435              }
436              enum "delayTCM2-down" {
437                value 78;
438                description
439                  "Delay on TCM2 down direction.";
440              }
441              enum "delayTCM3-down" {
442                value 79;
443                description
444                  "Delay on TCM3 down direction.";
445              }
446              enum "delayTCM4-down" {
447                value 80;
448                description
449                  "Delay on TCM4 down direction.";
450              }
451              enum "delayTCM5-down" {
452                value 81;
453                description
454                  "Delay on TCM5 down direction.";
455              }
456              enum "delayTCM6-down" {
457                value 82;
458                description
459                  "Delay on TCM6 down direction.";
460              }
461            }
462          }
463
464
465       typedef location {
466         type enumeration {
467           enum "notApplicable" {
468             value 1;
469           }
470           enum "nearEnd" {
471             value 2;
472           }
473           enum "farEnd" {
474             value 3;
475           }
476         }
477       }
478       typedef direction {
479         type enumeration {
480           enum "tx" {
481             value 1;
482           }
483           enum "rx" {
484             value 2;
485           }
486           enum "bidirectional" {
487             value 3;
488           }
489           enum "notApplicable" {
490             value 4;
491           }
492         }
493       }
494
495
496 }