Adding required ietf YANG models to support OTN tunnel as part of SOTN NNI-based...
[sdnc/oam.git] / platform-logic / restconfapi-yang / src / main / yang / sotn / ietf-otn-tunnel@2018-06-07.yang
1 module ietf-otn-tunnel {\r
2   yang-version 1.1;\r
3 \r
4   namespace "urn:ietf:params:xml:ns:yang:ietf-otn-tunnel";\r
5   prefix "otn-tunnel";\r
6 \r
7   import ietf-te {\r
8     prefix "te";\r
9   }\r
10 \r
11   import ietf-otn-types {\r
12     prefix "otn-types";\r
13   }\r
14 \r
15   import ietf-te-types {\r
16     prefix "te-types";\r
17   }\r
18 \r
19   import ietf-inet-types {\r
20     prefix "inet";\r
21   }\r
22 \r
23   organization\r
24     "IETF CCAMP Working Group";\r
25   contact\r
26     "WG Web: <http://tools.ietf.org/wg/ccamp/>\r
27      WG List: <mailto:ccamp@ietf.org>\r
28 \r
29      Editor: Haomian Zheng\r
30              <mailto:zhenghaomian@huawei.com>\r
31 \r
32      Editor: Aihua Guo\r
33              <mailto:aihuaguo@huawei.com>\r
34 \r
35      Editor: Italo Busi\r
36              <mailto:italo.busi@huawei.com>\r
37 \r
38      Editor: Anurag Sharma\r
39              <mailto:ansha@google.com>\r
40 \r
41      Editor: Rajan Rao\r
42              <mailto:rrao@infinera.com>\r
43 \r
44      Editor: Sergio Belotti\r
45              <mailto:sergio.belotti@nokia.com>\r
46 \r
47      Editor: Victor Lopez\r
48              <mailto:victor.lopezalvarez@telefonica.com>\r
49 \r
50      Editor: Yunbo Li\r
51              <mailto:liyunbo@chinamobile.com>\r
52 \r
53      Editor: Yunbin Xu\r
54              <mailto:xuyunbin@ritt.cn>";\r
55 \r
56   description\r
57     "This module defines a model for OTN Tunnel Services.";\r
58 \r
59   revision "2018-06-07" {\r
60     description\r
61       "Revision 0.5";\r
62     reference\r
63       "draft-ietf-ccamp-otn-tunnel-model-02";\r
64   }\r
65 \r
66  /*\r
67   * Groupings\r
68   */\r
69 \r
70   grouping otn-tunnel-endpoint {\r
71     description "Parameters for OTN tunnel";\r
72 \r
73     leaf payload-treatment {\r
74       type enumeration {\r
75         enum switching {\r
76           description "Client signal is switched to another tunnel\r
77                        in this domain";\r
78         }\r
79         enum transport {\r
80           description "Client signal is transparently transmitted\r
81                        in this domain";\r
82         }\r
83       }\r
84       default switching;\r
85       description\r
86         "Treatment of the incoming payload. Payload can be switched\r
87          or transported.";\r
88     }\r
89 \r
90     leaf src-client-signal {\r
91       type identityref {\r
92         base otn-types:client-signal;\r
93       }\r
94       description\r
95         "Client signal at the source endpoint of the tunnel";\r
96     }\r
97 \r
98     leaf src-tpn {\r
99       type uint16 {\r
100         range "0..4095";\r
101       }\r
102       description\r
103         "Tributary Port Number. Applicable in case of mux services";\r
104       reference\r
105         "RFC7139: GMPLS Signaling Extensions for Control of Evolving\r
106          G.709 Optical Transport Networks";\r
107     }\r
108 \r
109     leaf src-tsg {\r
110       type identityref {\r
111         base otn-types:tributary-slot-granularity;\r
112       }\r
113       description\r
114         "Tributary slot granularity.\r
115          Applicable in case of mux services";\r
116       reference\r
117         "G.709/Y.1331, February 2016: Interfaces for the\r
118          Optical Transport Network (OTN)";\r
119     }\r
120 \r
121     leaf src-tributary-slot-count {\r
122       type uint16;\r
123       description\r
124         "Number of tributary slots used at the source.";\r
125     }\r
126 \r
127     container src-tributary-slots {\r
128       description\r
129         "A list of tributary slots used by the client service.\r
130          Applicable in case of mux services";\r
131       leaf-list values {\r
132         type uint8;\r
133           description\r
134             "Tributary tributary slot value";\r
135           reference\r
136             "G.709/Y.1331, February 2016: Interfaces for the\r
137              Optical Transport Network (OTN)";\r
138       }\r
139     }\r
140 \r
141     leaf dst-client-signal {\r
142       type identityref {\r
143         base otn-types:client-signal;\r
144       }\r
145       description\r
146         "Client signal at the destination endpoint of the tunnel";\r
147     }\r
148 \r
149     leaf dst-tpn {\r
150       type uint16 {\r
151         range "0..4095";\r
152       }\r
153       description\r
154         "Tributary Port Number. Applicable in case of mux services";\r
155       reference\r
156         "RFC7139: GMPLS Signaling Extensions for Control of Evolving\r
157          G.709 Optical Transport Networks.";\r
158     }\r
159 \r
160     leaf dst-tsg {\r
161       type identityref {\r
162         base otn-types:tributary-slot-granularity;\r
163       }\r
164       description\r
165         "Tributary slot granularity.\r
166          Applicable in case of mux services";\r
167       reference\r
168         "G.709/Y.1331, February 2016: Interfaces for the\r
169          Optical Transport Network (OTN)";\r
170     }\r
171 \r
172     leaf dst-tributary-slot-count {\r
173       type uint16;\r
174       description\r
175         "Number of tributary slots used at the destination.";\r
176     }\r
177 \r
178     container dst-tributary-slots {\r
179       description\r
180         "A list of tributary slots used by the client service.\r
181          Applicable in case of mux services";\r
182       leaf-list values {\r
183         type uint8;\r
184         description\r
185           "Tributary slot value";\r
186         reference\r
187           "G.709/Y.1331, February 2016: Interfaces for the\r
188            Optical Transport Network (OTN)";\r
189       }\r
190     }\r
191   }\r
192 \r
193   /*\r
194   Note: Comment has been given to authors of TE Tunnel model to add\r
195   list of endpoints under config to support P2MP tunnel.\r
196   */\r
197 \r
198  /*\r
199   * Data nodes\r
200   */\r
201 \r
202   augment "/te:te/te:tunnels/te:tunnel" {\r
203     description\r
204       "Augment with additional parameters required for OTN service";\r
205     uses otn-tunnel-endpoint;\r
206   }\r
207 \r
208   /*\r
209    * Augment TE bandwidth\r
210    */\r
211 \r
212          /* Augment bandwidth of named-path-constraints */\r
213   augment "/te:te/te:globals/te:named-path-constraints/"\r
214         + "te:named-path-constraint/"\r
215         + "te:te-bandwidth/te:technology" {\r
216     description "OTN bandwidth.";\r
217     case otn {\r
218       uses otn-types:otn-path-bandwidth;\r
219     }\r
220   }\r
221 \r
222   /* Augment bandwdith of tunnel */\r
223   augment "/te:te/te:tunnels/te:tunnel/"\r
224         + "te:te-bandwidth/te:technology" {\r
225     description "OTN bandwidth.";\r
226     case otn {\r
227       uses otn-types:otn-path-bandwidth;\r
228     }\r
229   }\r
230 \r
231   /* Augment bandwidth of primary path */\r
232   augment "/te:te/te:tunnels/te:tunnel/"\r
233         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
234         + "te:te-bandwidth/te:technology" {\r
235     description "OTN bandwidth.";\r
236     case otn {\r
237       uses otn-types:otn-path-bandwidth;\r
238     }\r
239   }\r
240 \r
241   /* Augment bandwidth of reverse primary path */\r
242   augment "/te:te/te:tunnels/te:tunnel/"\r
243         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
244         + "te:p2p-reverse-primary-path/"\r
245         + "te:te-bandwidth/te:technology" {\r
246     description "OTN bandwidth.";\r
247     case otn {\r
248       uses otn-types:otn-path-bandwidth;\r
249     }\r
250   }\r
251 \r
252   /* Augment bandwidht of secondary path */\r
253   augment "/te:te/te:tunnels/te:tunnel/"\r
254         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
255         + "te:te-bandwidth/te:technology" {\r
256     description "OTN bandwidth.";\r
257     case otn {\r
258       uses otn-types:otn-path-bandwidth;\r
259     }\r
260   }\r
261   \r
262   /*\r
263    * Augment TE label.\r
264    */\r
265 \r
266   /* Augment label hop of route-object-exclude-always of named-path-constraints */\r
267   augment "/te:te/te:globals/te:named-path-constraints/"\r
268         + "te:named-path-constraint/te:explicit-route-objects/"\r
269         + "te:route-object-exclude-always/te:type/te:label/"\r
270         + "te:label-hop/te:te-label/te:technology" {\r
271     description "OTN label.";\r
272     case otn {\r
273       uses otn-types:otn-path-label;\r
274     }\r
275   }\r
276 \r
277   /* Augment label hop of route-object-include-exclude of named-path-constraints */\r
278   augment "/te:te/te:globals/te:named-path-constraints/"\r
279         + "te:named-path-constraint/te:explicit-route-objects/"\r
280         + "te:route-object-include-exclude/te:type/te:label/"\r
281         + "te:label-hop/te:te-label/te:technology" {\r
282     description "OTN label.";\r
283     case otn {\r
284       uses otn-types:otn-path-label;\r
285     }\r
286   }\r
287 \r
288 \r
289   /* Augment label hop of route-object-exclude-always of primary path */\r
290   augment "/te:te/te:tunnels/te:tunnel/"\r
291         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
292         + "te:explicit-route-objects/"\r
293         + "te:route-object-exclude-always/te:type/te:label/"\r
294         + "te:label-hop/te:te-label/te:technology" {\r
295     description "OTN label.";\r
296     case otn {\r
297       uses otn-types:otn-path-label;\r
298     }\r
299   }\r
300 \r
301   /* Augment label hop of route-object-include-exclude of primary path */\r
302   augment "/te:te/te:tunnels/te:tunnel/"\r
303         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
304         + "te:explicit-route-objects/"\r
305         + "te:route-object-include-exclude/te:type/te:label/"\r
306         + "te:label-hop/te:te-label/te:technology" {\r
307     description "OTN label.";\r
308     case otn {\r
309       uses otn-types:otn-path-label;\r
310     }\r
311   }\r
312 \r
313   /* Augment label hop of route-exclude of primary path */\r
314   augment "/te:te/te:tunnels/te:tunnel/"\r
315         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
316         + "te:optimizations/te:algorithm/te:metric/"\r
317         + "te:optimization-metric/te:explicit-route-exclude-objects/"\r
318         + "te:route-object-exclude-object/te:type/te:label/"\r
319         + "te:label-hop/te:te-label/te:technology" {\r
320     description "OTN label.";\r
321     case otn {\r
322       uses otn-types:otn-path-label;\r
323     }\r
324   }\r
325 \r
326   /* Augment label hop of route-include of primary path */\r
327   augment "/te:te/te:tunnels/te:tunnel/"\r
328         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
329         + "te:optimizations/te:algorithm/te:metric/"\r
330         + "te:optimization-metric/te:explicit-route-include-objects/"\r
331         + "te:route-object-include-object/te:type/te:label/"\r
332         + "te:label-hop/te:te-label/te:technology" {\r
333     description "OTN label.";\r
334     case otn {\r
335       uses otn-types:otn-path-label;\r
336     }\r
337   }\r
338 \r
339   /* Augment label hop of path-route of primary path */\r
340   augment "/te:te/te:tunnels/te:tunnel/"\r
341         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
342         + "te:state/te:path-properties/"\r
343         + "te:path-route-objects/te:path-computed-route-object/"\r
344         + "te:state/te:type/te:label/"\r
345         + "te:label-hop/te:te-label/te:technology" {\r
346     description "OTN label.";\r
347     case otn {\r
348       uses otn-types:otn-path-label;\r
349     }\r
350   }\r
351 \r
352   /*\r
353   augment "/te:te/te:tunnels/te:tunnel/"\r
354         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
355         + "te:state/te:lsps/te:lsp/te:record-route-subobjects/"\r
356                 + "te:record-route-subobject/"\r
357                 + "te:state/te:type/te:label/"\r
358         + "te:label-hop/te:te-label/te:technology" {\r
359     description "OTN label.";\r
360     case otn {\r
361           uses otn-types:otn-path-label;\r
362         }\r
363   }\r
364   */\r
365 \r
366   /* Augment label hop of path-route of primary LSP */\r
367   augment "/te:te/te:tunnels/te:tunnel/"\r
368         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
369         + "te:state/te:lsps/te:lsp/te:path-properties/"\r
370         + "te:path-route-objects/te:path-computed-route-object/"\r
371         + "te:state/te:type/te:label/"\r
372         + "te:label-hop/te:te-label/te:technology" {\r
373     description "OTN label.";\r
374     case otn {\r
375       uses otn-types:otn-path-label;\r
376     }\r
377   }\r
378 \r
379   /* Augment label hop of route-object-exclude-always of reverse primary path */\r
380   augment "/te:te/te:tunnels/te:tunnel/"\r
381         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
382         + "te:p2p-reverse-primary-path/"\r
383         + "te:explicit-route-objects/"\r
384         + "te:route-object-exclude-always/"\r
385         + "te:type/te:label/"\r
386         + "te:label-hop/te:te-label/te:technology" {\r
387     description "OTN label.";\r
388     case otn {\r
389       uses otn-types:otn-path-label;\r
390     }\r
391   }\r
392 \r
393   /* Augment label hop of route-object-include-exclude of reverse primary path */\r
394   augment "/te:te/te:tunnels/te:tunnel/"\r
395         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
396         + "te:p2p-reverse-primary-path/"\r
397         + "te:explicit-route-objects/"\r
398         + "te:route-object-include-exclude/"\r
399         + "te:type/te:label/"\r
400         + "te:label-hop/te:te-label/te:technology" {\r
401     description "OTN label.";\r
402     case otn {\r
403       uses otn-types:otn-path-label;\r
404     }\r
405   }\r
406 \r
407   /* Augment label hop of route-exclude of reverse primary path */\r
408   augment "/te:te/te:tunnels/te:tunnel/"\r
409         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
410         + "te:p2p-reverse-primary-path/"\r
411         + "te:optimizations/te:algorithm/te:metric/"\r
412         + "te:optimization-metric/te:explicit-route-exclude-objects/"\r
413         + "te:route-object-exclude-object/te:type/te:label/"\r
414         + "te:label-hop/te:te-label/te:technology" {\r
415     description "OTN label.";\r
416     case otn {\r
417       uses otn-types:otn-path-label;\r
418     }\r
419   }\r
420 \r
421   /* Augment label hop of route-include of reverse primary path */\r
422   augment "/te:te/te:tunnels/te:tunnel/"\r
423         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
424         + "te:p2p-reverse-primary-path/"\r
425         + "te:optimizations/te:algorithm/te:metric/"\r
426         + "te:optimization-metric/te:explicit-route-include-objects/"\r
427         + "te:route-object-include-object/te:type/te:label/"\r
428         + "te:label-hop/te:te-label/te:technology" {\r
429     description "OTN label.";\r
430     case otn {\r
431       uses otn-types:otn-path-label;\r
432     }\r
433   }\r
434 \r
435   /* Augment label hop of label hop of path-route of reverse primary path */\r
436   augment "/te:te/te:tunnels/te:tunnel/"\r
437         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
438         + "te:p2p-reverse-primary-path/"\r
439         + "te:state/te:path-properties/"\r
440         + "te:path-route-objects/te:path-computed-route-object/"\r
441         + "te:state/te:type/te:label/"\r
442         + "te:label-hop/te:te-label/te:technology" {\r
443     description "OTN label.";\r
444     case otn {\r
445       uses otn-types:otn-path-label;\r
446     }\r
447   }\r
448 \r
449   /*\r
450   augment "/te:te/te:tunnels/te:tunnel/"\r
451         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
452                 + "te:p2p-reverse-primary-path/"\r
453         + "te:state/te:lsps/te:lsp/te:lsp-record-route-subobjects/"\r
454                 + "te:record-route-subobject/"\r
455                 + "te:type/te:label/"\r
456         + "te:label-hop/te:te-label/te:technology" {\r
457     description "OTN label.";\r
458     case otn {\r
459           uses otn-types:otn-path-label;\r
460         }\r
461   }\r
462   */\r
463 \r
464   /* Augment label hop of path-route of reverse primary LSP */\r
465   augment "/te:te/te:tunnels/te:tunnel/"\r
466         + "te:p2p-primary-paths/te:p2p-primary-path/"\r
467         + "te:p2p-reverse-primary-path/"\r
468         + "te:state/te:lsps/te:lsp/te:path-properties/"\r
469         + "te:path-route-objects/te:path-computed-route-object/"\r
470         + "te:state/te:type/te:label/"\r
471         + "te:label-hop/te:te-label/te:technology" {\r
472     description "OTN label.";\r
473     case otn {\r
474       uses otn-types:otn-path-label;\r
475     }\r
476   }\r
477 \r
478   /* Augment label hop of route-object-exclude-always of secondary path */\r
479   augment "/te:te/te:tunnels/te:tunnel/"\r
480         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
481         + "te:explicit-route-objects/"\r
482         + "te:route-object-exclude-always/te:type/te:label/"\r
483         + "te:label-hop/te:te-label/te:technology" {\r
484     description "OTN label.";\r
485     case otn {\r
486       uses otn-types:otn-path-label;\r
487     }\r
488   }\r
489 \r
490   /* Augment label hop of route-object-include-exclude of secondary path */\r
491   augment "/te:te/te:tunnels/te:tunnel/"\r
492         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
493         + "te:explicit-route-objects/"\r
494         + "te:route-object-include-exclude/te:type/te:label/"\r
495         + "te:label-hop/te:te-label/te:technology" {\r
496     description "OTN label.";\r
497     case otn {\r
498       uses otn-types:otn-path-label;\r
499     }\r
500   }\r
501 \r
502   /* Augment label hop of route-exclude of secondary path */\r
503   augment "/te:te/te:tunnels/te:tunnel/"\r
504         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
505         + "te:optimizations/te:algorithm/te:metric/"\r
506         + "te:optimization-metric/te:explicit-route-exclude-objects/"\r
507         + "te:route-object-exclude-object/te:type/te:label/"\r
508         + "te:label-hop/te:te-label/te:technology" {\r
509     description "OTN label.";\r
510     case otn {\r
511       uses otn-types:otn-path-label;\r
512     }\r
513   }\r
514 \r
515   /* Augment label hop of route-include of secondary path */\r
516   augment "/te:te/te:tunnels/te:tunnel/"\r
517         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
518         + "te:optimizations/te:algorithm/te:metric/"\r
519         + "te:optimization-metric/te:explicit-route-include-objects/"\r
520         + "te:route-object-include-object/te:type/te:label/"\r
521         + "te:label-hop/te:te-label/te:technology" {\r
522     description "OTN label.";\r
523     case otn {\r
524       uses otn-types:otn-path-label;\r
525     }\r
526   }\r
527 \r
528   /* Augment label hop of label hop of path-route of secondary path */\r
529   augment "/te:te/te:tunnels/te:tunnel/"\r
530         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
531         + "te:state/te:path-properties/te:path-route-objects/" \r
532         + "te:path-computed-route-object/te:state/te:type/te:label/" \r
533         + "te:label-hop/te:te-label/te:technology" {\r
534     description "OTN label.";\r
535     case otn {\r
536       uses otn-types:otn-path-label;\r
537     }\r
538   }\r
539 \r
540   /*\r
541   augment "/te:te/te:tunnels/te:tunnel/"\r
542         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
543         + "te:state/te:lsps/te:lsp/te:lsp-record-route-subobjects/"\r
544                 + "te:record-route-subobject/"\r
545                 + "te:type/te:label/"\r
546         + "te:label-hop/te:te-label/te:technology" {\r
547     description "OTN label.";\r
548     case otn {\r
549           uses otn-types:otn-path-label;\r
550         }\r
551   }\r
552   */\r
553 \r
554   /* Augment label hop of path-route of secondary LSP */\r
555   augment "/te:te/te:tunnels/te:tunnel/"\r
556         + "te:p2p-secondary-paths/te:p2p-secondary-path/"\r
557         + "te:state/te:lsps/te:lsp/te:path-properties/"\r
558         + "te:path-route-objects/"\r
559         + "te:path-computed-route-object/te:state/te:type/te:label/" \r
560         + "te:label-hop/te:te-label/te:technology" {\r
561     description "OTN label.";\r
562     case otn {\r
563       uses otn-types:otn-path-label;\r
564     }\r
565   }\r
566 \r
567   /*\r
568   augment "/te:te/te:lsp-state/"\r
569         + "te:lsp-record-route-subobjects/te:lsp-record-route-subobject/" \r
570                 + "te:record-route-subobject/" \r
571                 + "te:type/te:label/te:label-hop/te:te-label/te:technology" {\r
572     description "OTN label.";\r
573     case otn {\r
574           uses otn-types:otn-path-label;\r
575         }\r
576   }\r
577   */\r
578   \r
579   \r
580   grouping p2p-path-ero {\r
581     description\r
582       "TE tunnel ERO configuration grouping";\r
583 \r
584     leaf te-default-metric {\r
585       type uint32;\r
586       description\r
587         "Traffic engineering metric.";\r
588     }\r
589     leaf te-delay-metric {\r
590       type uint32;\r
591       description\r
592         "Traffic engineering delay metric.";\r
593     }\r
594     leaf te-hop-metric {\r
595       type uint32;\r
596       description\r
597         "Traffic engineering hop metric.";\r
598     }\r
599     container explicit-route-objects {\r
600       description "Explicit route objects container";\r
601       list explicit-route-object {\r
602         key "index";\r
603         description\r
604           "List of explicit route objects";\r
605         leaf explicit-route-usage {\r
606           type identityref {\r
607             base te-types:route-usage-type;\r
608           }\r
609           description "An explicit-route hop action.";\r
610         }\r
611         uses te-types:explicit-route-hop {\r
612                   augment "type/label/label-hop/te-label/technology" {\r
613                     description "OTN label.";\r
614             case otn {\r
615                   uses otn-types:otn-path-label;\r
616                 }\r
617                   }\r
618                 }\r
619       }\r
620     }\r
621   }\r
622 \r
623   rpc otn-te-tunnel-path-compute {\r
624     description "OTN TE tunnel path computation";\r
625     input {\r
626       list request {\r
627         key "id";\r
628         description "A list of path computation requests.";\r
629 \r
630         leaf id {\r
631           type uint8;\r
632           description\r
633             "Request ID.";\r
634         }\r
635         leaf type {\r
636           type identityref {\r
637             base te-types:tunnel-type;\r
638           }\r
639           description "TE tunnel type.";\r
640         }\r
641         leaf source {\r
642           type inet:ip-address;\r
643           description\r
644             "TE tunnel source address.";\r
645         }\r
646         leaf destination {\r
647           type inet:ip-address;\r
648           description\r
649             "TE tunnel destination address";\r
650         }\r
651         leaf src-tp-id {\r
652           type binary;\r
653           description\r
654             "TE tunnel source termination point identifier.";\r
655         }\r
656         leaf dst-tp-id {\r
657           type binary;\r
658           description\r
659             "TE tunnel destination termination point identifier.";\r
660         }\r
661         leaf switching-layer {\r
662           type identityref {\r
663             base te-types:switching-capabilities;\r
664           }\r
665           description\r
666             "Switching layer where the requests are computed.";\r
667         }\r
668         leaf encoding {\r
669           type identityref {\r
670             base te-types:lsp-encoding-types;\r
671           }\r
672           description "LSP encoding type";\r
673         }\r
674         leaf protection-type {\r
675           type identityref {\r
676             base te-types:lsp-protection-type;\r
677           }\r
678           description "LSP protection type";\r
679         }\r
680         leaf restoration-type {\r
681           type identityref {\r
682             base te-types:lsp-restoration-type;\r
683           }\r
684           description "LSP restoration type";\r
685         }\r
686         leaf provider-id {\r
687           type te-types:te-global-id;\r
688           description\r
689             "An identifier to uniquely identify a provider.";\r
690         }\r
691         leaf client-id {\r
692           type te-types:te-global-id;\r
693           description\r
694             "An identifier to uniquely identify a client.";\r
695         }\r
696         leaf te-topology-id {\r
697           type te-types:te-topology-id;\r
698           description\r
699             "It is presumed that a datastore will contain many\r
700              topologies. To distinguish between topologies it is\r
701              vital to have UNIQUE topology identifiers.";\r
702         }\r
703         leaf setup-priority {\r
704           type uint8 {\r
705             range "0..7";\r
706           }\r
707           description\r
708             "TE LSP setup priority";\r
709         }\r
710         leaf hold-priority {\r
711           type uint8 {\r
712             range "0..7";\r
713           }\r
714           description\r
715             "TE LSP hold priority";\r
716         }\r
717         leaf te-path-metric-type {\r
718           type identityref {\r
719             base te-types:path-metric-type;\r
720           }\r
721           default te-types:path-metric-te;\r
722           description\r
723             "The tunnel path metric type.";\r
724         }\r
725 \r
726         leaf odu-type {\r
727           type identityref{\r
728             base otn-types:tributary-protocol-type;\r
729           }\r
730           description "Type of ODU";\r
731         }\r
732         container p2p-primary-paths {\r
733           description "Set of P2P primary paths container";\r
734           list p2p-primary-path {\r
735             key "name";\r
736             description\r
737               "List of primary paths for this tunnel.";\r
738             leaf name {\r
739               type string;\r
740               description "TE path name";\r
741             }\r
742             uses p2p-path-ero;\r
743           }\r
744         }\r
745         container p2p-secondary-paths {\r
746           description "Set of P2P secondary paths container";\r
747           list p2p-secondary-path {\r
748             key "name";\r
749             description\r
750               "List of secondary paths for this tunnel.";\r
751             leaf name {\r
752               type string;\r
753               description "TE path name";\r
754             }\r
755             uses p2p-path-ero;\r
756           }\r
757         }\r
758         uses otn-tunnel-endpoint;\r
759       }\r
760     }\r
761     output {\r
762       leaf return-code {\r
763         type enumeration {\r
764           enum success {\r
765             description "success";\r
766           }\r
767           enum aborted {\r
768             description "aborted";\r
769           }\r
770           enum destination-not-found {\r
771             description "destination-not-found";\r
772           }\r
773           enum invalid-argument {\r
774             description "invalid-argument";\r
775           }\r
776           enum no-memory {\r
777             description "no-memory";\r
778           }\r
779           enum no-path-found {\r
780             description "no-path-found";\r
781           }\r
782           enum other-error {\r
783             description "other-error";\r
784           }\r
785           enum some-path-not-found {\r
786             description "some-path-not-found";\r
787           }\r
788           enum source-not-found {\r
789             description "source-not-found";\r
790           }\r
791           enum topology-error {\r
792             description "topology-error";\r
793           }\r
794         }\r
795         description\r
796           "Return code";\r
797       }\r
798       list result {\r
799         key "id";\r
800         description\r
801           "A list of results for all requests.";\r
802 \r
803         leaf id {\r
804           type uint8;\r
805           description\r
806             "Request ID";\r
807         }\r
808         container p2p-primary-paths {\r
809           description "Set of P2P primary paths container";\r
810           list p2p-primary-path {\r
811             key "name";\r
812             description\r
813               "List of resultant primary paths for this tunnel.";\r
814             leaf name {\r
815               type string;\r
816               description "TE path name";\r
817             }\r
818             uses p2p-path-ero;\r
819           }\r
820         }\r
821         container p2p-secondary-paths {\r
822           description "Set of P2P secondary paths container";\r
823           list p2p-secondary-path {\r
824             key "name";\r
825             description\r
826               "List of resultant secondary paths for this tunnel.";\r
827             leaf name {\r
828               type string;\r
829               description "TE path name";\r
830             }\r
831             uses p2p-path-ero;\r
832           }\r
833         }\r
834       }\r
835     }\r
836   }\r
837 }\r