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-types@2018-06-07.yang
1 module ietf-otn-types {
2   namespace "urn:ietf:params:xml:ns:yang:ietf-otn-types";
3   prefix "otn-types";
4
5   organization
6     "IETF CCAMP Working Group";
7   contact
8     "WG Web: <http://tools.ietf.org/wg/ccamp/>
9      WG List: <mailto:ccamp@ietf.org>
10
11      Editor: Haomian Zheng
12              <mailto:zhenghaomian@huawei.com>
13
14      Editor: Aihua Guo
15              <mailto:aihuaguo@huawei.com>
16
17      Editor: Italo Busi
18              <mailto:italo.busi@huawei.com>
19
20      Editor: Anurag Sharma
21              <mailto:ansha@google.com>
22
23      Editor: Rajan Rao
24              <mailto:rrao@infinera.com>
25
26      Editor: Sergio Belotti
27              <mailto:sergio.belotti@nokia.com>
28
29      Editor: Victor Lopez
30              <mailto:victor.lopezalvarez@telefonica.com>
31
32      Editor: Yunbo Li
33              <mailto:liyunbo@chinamobile.com>
34
35      Editor: Yunbin Xu
36              <mailto:xuyunbin@ritt.cn>";
37
38   description
39     "This module defines OTN types.";
40
41   revision "2018-06-07" {
42     description
43       "Revision 0.5";
44     reference
45       "draft-ietf-ccamp-otn-tunnel-model-02";
46   }
47
48   identity tributary-slot-granularity {
49     description
50       "Tributary slot granularity";
51     reference
52       "G.709/Y.1331, February 2016: Interfaces for the Optical
53        Transport Network (OTN)";
54   }
55
56   identity tsg-1.25G {
57     base tributary-slot-granularity;
58     description
59       "1.25G tributary slot granularity";
60   }
61
62   identity tsg-2.5G {
63     base tributary-slot-granularity;
64     description
65       "2.5G tributary slot granularity";
66   }
67 /*
68   identity tsg-1.25Gand2.5G {
69     base tributary-slot-granularity;
70     description
71       "Both 1.25G and 2.5G tributary slot granularity";
72   }
73 */
74   identity tributary-protocol-type {
75     description
76       "Base identity for protocol framing used by tributary signals";
77   }
78
79   identity prot-OTU1 {
80     base tributary-protocol-type;
81     description
82       "OTU1 protocol (2.66G)";
83   }
84 /*
85   identity prot-OTU1e {
86     base tributary-protocol-type;
87     description
88       "OTU1e type (11.04G)";
89   }
90
91   identity prot-OTU1f {
92     base tributary-protocol-type;
93     description
94       "OTU1f type (11.27G)";
95   }
96 */
97   identity prot-OTU2 {
98     base tributary-protocol-type;
99     description
100       "OTU2 type (10.70G)";
101   }
102
103   identity prot-OTU2e {
104     base tributary-protocol-type;
105     description
106       "OTU2e type (11.09G)";
107   }
108 /*
109   identity prot-OTU2f {
110     base tributary-protocol-type;
111     description
112       "OTU2f type (11.31G)";
113   }
114 */
115   identity prot-OTU3 {
116     base tributary-protocol-type;
117     description
118       "OTU3 type (43.01G)";
119   }
120 /*
121   identity prot-OTU3e1 {
122     base tributary-protocol-type;
123     description
124       "OTU3e1 type (44.57G)";
125   }
126
127   identity prot-OTU3e2 {
128     base tributary-protocol-type;
129     description
130       "OTU3e2 type (44.58G)";
131   }
132 */
133   identity prot-OTU4 {
134     base tributary-protocol-type;
135     description
136       "OTU4 type (111.80G)";
137   }
138
139   identity prot-OTUCn {
140     base tributary-protocol-type;
141     description
142       "OTUCn type (beyond 100G)";
143   }
144
145   identity prot-ODU0 {
146     base tributary-protocol-type;
147     description
148       "ODU0 protocol (1.24G)";
149   }
150
151   identity prot-ODU1 {
152     base tributary-protocol-type;
153     description
154       "ODU1 protocol (2.49G)";
155   }
156 /*
157   identity prot-ODU1e {
158     base tributary-protocol-type;
159     description
160       "ODU1e protocol (10.35G).";
161   }
162
163   identity prot-ODU1f {
164     base tributary-protocol-type;
165     description
166       "ODU1f protocol (10.56G).";
167   }
168 */
169   identity prot-ODU2 {
170     base tributary-protocol-type;
171     description
172       "ODU2 protocol (10.03G)";
173   }
174
175   identity prot-ODU2e {
176     base tributary-protocol-type;
177     description
178       "ODU2e protocol (10.39G)";
179   }
180 /*
181   identity prot-ODU2f {
182     base tributary-protocol-type;
183     description
184       "ODU2f protocol (10.60G).";
185   }
186 */
187   identity prot-ODU3 {
188     base tributary-protocol-type;
189     description
190       "ODU3 protocol (40.31G)";
191   }
192 /*
193   identity prot-ODU3e1 {
194     base tributary-protocol-type;
195     description
196       "ODU3e1 protocol (41.77G).";
197   }
198
199   identity prot-ODU3e2 {
200     base tributary-protocol-type;
201     description
202       "ODU3e2 protocol (41.78G).";
203   }
204 */
205   identity prot-ODU4 {
206     base tributary-protocol-type;
207     description
208       "ODU4 protocol (104.79G)";
209   }
210
211   identity prot-ODUFlex-cbr {
212     base tributary-protocol-type;
213     description
214       "ODU Flex CBR protocol for transporting constant bit rate
215        signal";
216   }
217
218   identity prot-ODUFlex-gfp {
219     base tributary-protocol-type;
220     description
221       "ODU Flex GFP protocol for transporting stream of packets
222        using Generic Framing Procedure";
223   }
224
225   identity prot-ODUCn {
226     base tributary-protocol-type;
227     description
228       "ODUCn protocol (beyond 100G)";
229   }
230
231   identity prot-1GbE {
232     base tributary-protocol-type;
233     description
234       "1G Ethernet protocol";
235   }
236   identity prot-10GbE-LAN {
237     base tributary-protocol-type;
238     description
239       "10G Ethernet LAN protocol";
240   }
241
242   identity prot-40GbE {
243     base tributary-protocol-type;
244     description
245       "40G Ethernet protocol";
246   }
247
248   identity prot-100GbE {
249     base tributary-protocol-type;
250     description
251       "100G Ethernet protocol";
252   }
253
254   identity client-signal {
255     description
256       "Base identity from which specific client signals for the
257        tunnel are derived";
258   }
259
260   identity client-signal-1GbE {
261     base client-signal;
262     description
263       "Client signal type of 1GbE";
264   }
265
266   identity client-signal-10GbE-LAN {
267     base client-signal;
268     description
269       "Client signal type of 10GbE LAN";
270   }
271
272   identity client-signal-10GbE-WAN {
273     base client-signal;
274     description
275       "Client signal type of 10GbE WAN";
276   }
277
278   identity client-signal-40GbE {
279     base client-signal;
280     description
281       "Client signal type of 40GbE";
282   }
283
284   identity client-signal-100GbE {
285     base client-signal;
286     description
287       "Client signal type of 100GbE";
288   }
289
290   identity client-signal-OC3_STM1 {
291     base client-signal;
292     description
293       "Client signal type of OC3 & STM1";
294   }
295
296   identity client-signal-OC12_STM4 {
297     base client-signal;
298     description
299       "Client signal type of OC12 & STM4";
300   }
301
302   identity client-signal-OC48_STM16 {
303     base client-signal;
304     description
305       "Client signal type of OC48 & STM16";
306   }
307
308   identity client-signal-OC192_STM64 {
309     base client-signal;
310     description
311       "Client signal type of OC192 & STM64";
312   }
313
314   identity client-signal-OC768_STM256 {
315     base client-signal;
316     description
317       "Client signal type of OC768 & STM256";
318   }
319
320   identity client-signal-ODU0 {
321     base client-signal;
322     description
323       "Client signal type of ODU0 (1.24G)";
324   }
325
326   identity client-signal-ODU1 {
327     base client-signal;
328     description
329       "ODU1 protocol (2.49G)";
330   }
331
332   identity client-signal-ODU2 {
333     base client-signal;
334     description
335       "Client signal type of ODU2 (10.03G)";
336   }
337
338   identity client-signal-ODU2e {
339     base client-signal;
340     description
341       "Client signal type of ODU2e (10.39G)";
342   }
343
344   identity client-signal-ODU3 {
345     base client-signal;
346     description
347       "Client signal type of ODU3 (40.31G)";
348   }
349 /*
350   identity client-signal-ODU3e2 {
351     base client-signal;
352     description
353       "Client signal type of ODU3e2 (41.78G)";
354   }
355 */
356   identity client-signal-ODU4 {
357     base client-signal;
358     description
359       "Client signal type of ODU4 (104.79G)";
360   }
361
362   identity client-signal-ODUflex-cbr {
363     base client-signal;
364     description
365       "Client signal type of ODU Flex CBR";
366   }
367
368   identity client-signal-ODUflex-gfp {
369     base client-signal;
370     description
371       "Client signal type of ODU Flex GFP";
372   }
373
374   identity client-signal-ODUCn {
375     base client-signal;
376     description
377       "Client signal type of ODUCn (beyond 100G)";
378   }
379
380   identity client-signal-FC400 {
381     base client-signal;
382     description
383       "Client signal type of Fibre Channel FC400";
384   }
385
386   identity client-signal-FC800 {
387     base client-signal;
388     description
389       "Client signal type of Fibre Channel FC800";
390   }
391
392   identity client-signal-FICON-4G {
393     base client-signal;
394     description
395       "Client signal type of Fibre Connection 4G";
396   }
397
398   identity client-signal-FICON-8G {
399     base client-signal;
400     description
401       "Client signal type of Fibre Connection 8G";
402   }
403
404   identity client-signal-OTU1 {
405     base client-signal;
406     description
407       "Client signal type of OTU1";
408   }
409
410   identity client-signal-OTU2 {
411     base client-signal;
412     description
413       "Client signal type of OTU2";
414   }
415
416   identity client-signal-OTU2e {
417     base client-signal;
418     description
419       "Client signal type of OTU2e";
420   }
421
422   identity client-signal-OTU3 {
423     base client-signal;
424     description
425       "Client signal type of OTU3";
426   }
427
428   identity client-signal-OTU4 {
429     base client-signal;
430     description
431       "Client signal type of OTU4";
432   }
433
434   identity otn-label-range-type {
435     description
436       "Base identity from which specific OTN label
437            range types derived";
438   }
439
440   identity label-range-trib-slot {
441     base otn-label-range-type;
442     description
443       "Defines a range of OTN tributary slots";
444   }
445
446   identity label-range-trib-port {
447     base otn-label-range-type;
448     description
449       "Defines a range of OTN tributary ports";
450   }
451   
452   grouping otn-link-bandwidth {
453     list odulist {
454       key "odu-type";
455       description
456         "OTN bandwidth definition";
457       leaf odu-type {
458         type identityref {
459           base otn-types:tributary-protocol-type;
460         }
461         description "ODU type";
462       }
463       leaf number {
464         type uint16;
465         description "Number of ODUs";
466       }
467     }
468   }
469
470   grouping otn-path-bandwidth {
471     leaf odu-type {
472       type identityref {
473         base otn-types:tributary-protocol-type;
474       }
475       description "ODU type";
476     }
477   }
478
479   grouping otn-label-restriction {
480     leaf range-type {
481       type identityref {
482         base otn-types:otn-label-range-type;
483       }
484     }
485     leaf tsg {
486       type identityref {
487         base otn-types:tributary-slot-granularity;
488       }
489       description "Tributary slot granularity.";
490       reference
491         "G.709/Y.1331, February 2016: Interfaces for the
492          Optical Transport Network (OTN)";
493     } 
494     leaf priority {
495       type uint8;
496       description "priority.";
497     }
498   }
499  
500
501   grouping otn-link-label {
502     choice otn-label-type {
503       description
504         "OTN label type";
505       case tributary-port {
506         leaf tpn {
507           type uint16 {
508             range "1..4095";
509           }
510           description
511             "Tributary Port Number. Applicable in case of mux services.";
512           reference
513             "RFC7139: GMPLS Signaling Extensions for Control of Evolving
514              G.709 Optical Transport Networks.";
515         }
516       }
517       case tributary-slot {
518         leaf ts {
519           type uint16 {
520             range "1..4095";
521           }
522           description
523             "Tributary Slot Number. Applicable in case of mux services.";
524           reference
525             "RFC7139: GMPLS Signaling Extensions for Control of Evolving
526              G.709 Optical Transport Networks.";
527         }
528       }
529     }
530   }
531
532   grouping otn-path-label {
533     leaf tpn {
534       type uint16 {
535         range "1..4095";
536       }
537       description
538         "Tributary Port Number. Applicable in case of mux services.";
539       reference
540         "RFC7139: GMPLS Signaling Extensions for Control of Evolving
541          G.709 Optical Transport Networks.";
542     }
543     leaf tsg {
544       type identityref {
545         base otn-types:tributary-slot-granularity;
546       }
547       description "Tributary slot granularity.";
548       reference
549         "G.709/Y.1331, February 2016: Interfaces for the
550          Optical Transport Network (OTN)";
551     }
552     leaf ts-list {
553       type string {
554           pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?"
555                 + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)";
556         }
557         description
558           "A list of available tributary slots ranging
559            between 1 and 9999.
560            For example 1-20,25,50-1000";
561         reference "RFC 7139: GMPLS Signaling Extensions for Control
562                    of Evolving G.709 Optical Transport Networks";
563     }
564   }
565 }