Add RFC8776 types
[mdsal.git] / model / ietf / rfc8776-ietf-te-packet-types / src / main / yang / ietf-te-packet-types@2020-06-10.yang
1 module ietf-te-packet-types {
2   yang-version 1.1;
3   namespace "urn:ietf:params:xml:ns:yang:ietf-te-packet-types";
4   prefix te-packet-types;
5
6   /* Import TE generic types */
7
8   import ietf-te-types {
9     prefix te-types;
10     reference
11       "RFC 8776: Common YANG Data Types for Traffic Engineering";
12   }
13
14   organization
15     "IETF Traffic Engineering Architecture and Signaling (TEAS)
16      Working Group";
17   contact
18     "WG Web:   <https://datatracker.ietf.org/wg/teas/>
19      WG List:  <mailto:teas@ietf.org>
20
21      Editor:   Tarek Saad
22                <mailto:tsaad@juniper.net>
23
24      Editor:   Rakesh Gandhi
25                <mailto:rgandhi@cisco.com>
26
27      Editor:   Vishnu Pavan Beeram
28                <mailto:vbeeram@juniper.net>
29
30      Editor:   Xufeng Liu
31                <mailto:xufeng.liu.ietf@gmail.com>
32
33      Editor:   Igor Bryskin
34                <mailto:i_bryskin@yahoo.com>";
35   description
36     "This YANG module contains a collection of generally useful YANG
37      data type definitions specific to MPLS TE.  The model fully
38      conforms to the Network Management Datastore Architecture
39      (NMDA).
40
41      Copyright (c) 2020 IETF Trust and the persons identified as
42      authors of the code.  All rights reserved.
43
44      Redistribution and use in source and binary forms, with or
45      without modification, is permitted pursuant to, and subject to
46      the license terms contained in, the Simplified BSD License set
47      forth in Section 4.c of the IETF Trust's Legal Provisions
48      Relating to IETF Documents
49      (https://trustee.ietf.org/license-info).
50
51      This version of this YANG module is part of RFC 8776; see the
52      RFC itself for full legal notices.";
53
54   revision 2020-06-10 {
55     description
56       "Latest revision of TE MPLS types.";
57     reference
58       "RFC 8776: Common YANG Data Types for Traffic Engineering";
59   }
60
61   /**
62    * Typedefs
63    */
64
65   typedef te-bandwidth-requested-type {
66     type enumeration {
67       enum specified {
68         description
69           "Bandwidth is explicitly specified.";
70       }
71       enum auto {
72         description
73           "Bandwidth is automatically computed.";
74       }
75     }
76     description
77       "Enumerated type for specifying whether bandwidth is
78        explicitly specified or automatically computed.";
79   }
80
81   typedef te-class-type {
82     type uint8;
83     description
84       "Diffserv-TE Class-Type.  Defines a set of Traffic Trunks
85        crossing a link that is governed by a specific set of
86        bandwidth constraints.  Class-Type is used for the purposes
87        of link bandwidth allocation, constraint-based routing, and
88        admission control.";
89     reference
90       "RFC 4124: Protocol Extensions for Support of Diffserv-aware
91        MPLS Traffic Engineering";
92   }
93
94   typedef bc-type {
95     type uint8 {
96       range "0..7";
97     }
98     description
99       "Diffserv-TE bandwidth constraints as defined in RFC 4124.";
100     reference
101       "RFC 4124: Protocol Extensions for Support of Diffserv-aware
102        MPLS Traffic Engineering";
103   }
104
105   typedef bandwidth-kbps {
106     type uint64;
107     units "Kbps";
108     description
109       "Bandwidth values, expressed in kilobits per second.";
110   }
111
112   typedef bandwidth-mbps {
113     type uint64;
114     units "Mbps";
115     description
116       "Bandwidth values, expressed in megabits per second.";
117   }
118
119   typedef bandwidth-gbps {
120     type uint64;
121     units "Gbps";
122     description
123       "Bandwidth values, expressed in gigabits per second.";
124   }
125
126   identity backup-protection-type {
127     description
128       "Base identity for the backup protection type.";
129   }
130
131   identity backup-protection-link {
132     base backup-protection-type;
133     description
134       "Backup provides link protection only.";
135   }
136
137   identity backup-protection-node-link {
138     base backup-protection-type;
139     description
140       "Backup offers node (preferred) or link protection.";
141   }
142
143   identity bc-model-type {
144     description
145       "Base identity for the Diffserv-TE Bandwidth Constraints
146        Model type.";
147     reference
148       "RFC 4124: Protocol Extensions for Support of Diffserv-aware
149        MPLS Traffic Engineering";
150   }
151
152   identity bc-model-rdm {
153     base bc-model-type;
154     description
155       "Russian Dolls Bandwidth Constraints Model type.";
156     reference
157       "RFC 4127: Russian Dolls Bandwidth Constraints Model for
158                  Diffserv-aware MPLS Traffic Engineering";
159   }
160
161   identity bc-model-mam {
162     base bc-model-type;
163     description
164       "Maximum Allocation Bandwidth Constraints Model type.";
165     reference
166       "RFC 4125: Maximum Allocation Bandwidth Constraints Model for
167                  Diffserv-aware MPLS Traffic Engineering";
168   }
169
170   identity bc-model-mar {
171     base bc-model-type;
172     description
173       "Maximum Allocation with Reservation Bandwidth Constraints
174        Model type.";
175     reference
176       "RFC 4126: Max Allocation with Reservation Bandwidth
177        Constraints Model for Diffserv-aware MPLS Traffic Engineering
178        & Performance Comparisons";
179   }
180
181   grouping performance-metrics-attributes-packet {
182     description
183       "Contains PM attributes.";
184     uses te-types:performance-metrics-attributes {
185       augment "performance-metrics-one-way" {
186         leaf one-way-min-delay {
187           type uint32 {
188             range "0..16777215";
189           }
190           description
191             "One-way minimum delay or latency in microseconds.";
192         }
193         leaf one-way-min-delay-normality {
194           type te-types:performance-metrics-normality;
195           default "normal";
196           description
197             "One-way minimum delay or latency normality.";
198         }
199         leaf one-way-max-delay {
200           type uint32 {
201             range "0..16777215";
202           }
203           description
204             "One-way maximum delay or latency in microseconds.";
205         }
206         leaf one-way-max-delay-normality {
207           type te-types:performance-metrics-normality;
208           default "normal";
209           description
210             "One-way maximum delay or latency normality.";
211         }
212         leaf one-way-delay-variation {
213           type uint32 {
214             range "0..16777215";
215           }
216           description
217             "One-way delay variation in microseconds.";
218           reference
219             "RFC 5481: Packet Delay Variation Applicability
220              Statement, Section 4.2";
221         }
222         leaf one-way-delay-variation-normality {
223           type te-types:performance-metrics-normality;
224           default "normal";
225           description
226             "One-way delay variation normality.";
227           reference
228             "RFC 7471: OSPF Traffic Engineering (TE) Metric
229              Extensions
230              RFC 7823: Performance-Based Path Selection for
231              Explicitly Routed Label Switched Paths (LSPs) Using
232              TE Metric Extensions
233              RFC 8570: IS-IS Traffic Engineering (TE) Metric
234              Extensions";
235         }
236         leaf one-way-packet-loss {
237           type decimal64 {
238             fraction-digits 6;
239             range "0..50.331642";
240           }
241           description
242             "One-way packet loss as a percentage of the total traffic
243              sent over a configurable interval.  The finest precision
244              is 0.000003%, where the maximum is 50.331642%.";
245           reference
246             "RFC 8570: IS-IS Traffic Engineering (TE) Metric
247              Extensions, Section 4.4";
248         }
249         leaf one-way-packet-loss-normality {
250           type te-types:performance-metrics-normality;
251           default "normal";
252           description
253             "Packet loss normality.";
254           reference
255             "RFC 7471: OSPF Traffic Engineering (TE) Metric
256              Extensions
257              RFC 7823: Performance-Based Path Selection for
258              Explicitly Routed Label Switched Paths (LSPs) Using
259              TE Metric Extensions
260              RFC 8570: IS-IS Traffic Engineering (TE) Metric
261              Extensions";
262         }
263         description
264           "PM one-way packet-specific augmentation for a generic PM
265            grouping.";
266       }
267       augment "performance-metrics-two-way" {
268         leaf two-way-min-delay {
269           type uint32 {
270             range "0..16777215";
271           }
272           default "0";
273           description
274             "Two-way minimum delay or latency in microseconds.";
275         }
276         leaf two-way-min-delay-normality {
277           type te-types:performance-metrics-normality;
278           default "normal";
279           description
280             "Two-way minimum delay or latency normality.";
281           reference
282             "RFC 7471: OSPF Traffic Engineering (TE) Metric
283              Extensions
284              RFC 7823: Performance-Based Path Selection for
285              Explicitly Routed Label Switched Paths (LSPs) Using
286              TE Metric Extensions
287              RFC 8570: IS-IS Traffic Engineering (TE) Metric
288              Extensions";
289         }
290         leaf two-way-max-delay {
291           type uint32 {
292             range "0..16777215";
293           }
294           default "0";
295           description
296             "Two-way maximum delay or latency in microseconds.";
297         }
298         leaf two-way-max-delay-normality {
299           type te-types:performance-metrics-normality;
300           default "normal";
301           description
302             "Two-way maximum delay or latency normality.";
303           reference
304             "RFC 7471: OSPF Traffic Engineering (TE) Metric
305              Extensions
306              RFC 7823: Performance-Based Path Selection for
307              Explicitly Routed Label Switched Paths (LSPs) Using
308              TE Metric Extensions
309              RFC 8570: IS-IS Traffic Engineering (TE) Metric
310              Extensions";
311         }
312         leaf two-way-delay-variation {
313           type uint32 {
314             range "0..16777215";
315           }
316           default "0";
317           description
318             "Two-way delay variation in microseconds.";
319           reference
320             "RFC 5481: Packet Delay Variation Applicability
321              Statement, Section 4.2";
322         }
323         leaf two-way-delay-variation-normality {
324           type te-types:performance-metrics-normality;
325           default "normal";
326           description
327             "Two-way delay variation normality.";
328           reference
329             "RFC 7471: OSPF Traffic Engineering (TE) Metric
330              Extensions
331              RFC 7823: Performance-Based Path Selection for
332              Explicitly Routed Label Switched Paths (LSPs) Using
333              TE Metric Extensions
334              RFC 8570: IS-IS Traffic Engineering (TE) Metric
335              Extensions";
336         }
337         leaf two-way-packet-loss {
338           type decimal64 {
339             fraction-digits 6;
340             range "0..50.331642";
341           }
342           default "0";
343           description
344             "Two-way packet loss as a percentage of the total traffic
345              sent over a configurable interval.  The finest precision
346              is 0.000003%.";
347         }
348         leaf two-way-packet-loss-normality {
349           type te-types:performance-metrics-normality;
350           default "normal";
351           description
352             "Two-way packet loss normality.";
353         }
354         description
355           "PM two-way packet-specific augmentation for a generic PM
356            grouping.";
357         reference
358           "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions
359            RFC 7823: Performance-Based Path Selection for
360            Explicitly Routed Label Switched Paths (LSPs) Using
361            TE Metric Extensions
362            RFC 8570: IS-IS Traffic Engineering (TE) Metric
363            Extensions";
364       }
365     }
366   }
367
368   grouping one-way-performance-metrics-packet {
369     description
370       "One-way packet PM throttle grouping.";
371     leaf one-way-min-delay {
372       type uint32 {
373         range "0..16777215";
374       }
375       default "0";
376       description
377         "One-way minimum delay or latency in microseconds.";
378     }
379     leaf one-way-max-delay {
380       type uint32 {
381         range "0..16777215";
382       }
383       default "0";
384       description
385         "One-way maximum delay or latency in microseconds.";
386     }
387     leaf one-way-delay-variation {
388       type uint32 {
389         range "0..16777215";
390       }
391       default "0";
392       description
393         "One-way delay variation in microseconds.";
394     }
395     leaf one-way-packet-loss {
396       type decimal64 {
397         fraction-digits 6;
398         range "0..50.331642";
399       }
400       default "0";
401       description
402         "One-way packet loss as a percentage of the total traffic
403          sent over a configurable interval.  The finest precision is
404          0.000003%.";
405     }
406   }
407
408   grouping two-way-performance-metrics-packet {
409     description
410       "Two-way packet PM throttle grouping.";
411     leaf two-way-min-delay {
412       type uint32 {
413         range "0..16777215";
414       }
415       default "0";
416       description
417         "Two-way minimum delay or latency in microseconds.";
418     }
419     leaf two-way-max-delay {
420       type uint32 {
421         range "0..16777215";
422       }
423       default "0";
424       description
425         "Two-way maximum delay or latency in microseconds.";
426     }
427     leaf two-way-delay-variation {
428       type uint32 {
429         range "0..16777215";
430       }
431       default "0";
432       description
433         "Two-way delay variation in microseconds.";
434     }
435     leaf two-way-packet-loss {
436       type decimal64 {
437         fraction-digits 6;
438         range "0..50.331642";
439       }
440       default "0";
441       description
442         "Two-way packet loss as a percentage of the total traffic
443          sent over a configurable interval.  The finest precision is
444          0.000003%.";
445     }
446   }
447
448   grouping performance-metrics-throttle-container-packet {
449     description
450       "Packet PM threshold grouping.";
451     uses te-types:performance-metrics-throttle-container {
452       augment "throttle/threshold-out" {
453         uses one-way-performance-metrics-packet;
454         uses two-way-performance-metrics-packet;
455         description
456           "PM threshold-out packet augmentation for a
457            generic grouping.";
458       }
459       augment "throttle/threshold-in" {
460         uses one-way-performance-metrics-packet;
461         uses two-way-performance-metrics-packet;
462         description
463           "PM threshold-in packet augmentation for a
464            generic grouping.";
465       }
466       augment "throttle/threshold-accelerated-advertisement" {
467         uses one-way-performance-metrics-packet;
468         uses two-way-performance-metrics-packet;
469         description
470           "PM accelerated advertisement packet augmentation for a
471            generic grouping.";
472       }
473     }
474   }
475 }