1 update yang_resource set
2 checksum = '25516798613f862ad20831e59ba02b75ecdc9c6f5547ed5d90bda76143bf0112',
3 content = 'module ietf-yang-types {
5 namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
9 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
12 "WG Web: <http://tools.ietf.org/wg/netmod/>
13 WG List: <mailto:netmod@ietf.org>
15 WG Chair: David Kessens
16 <mailto:david.kessens@nsn.com>
18 WG Chair: Juergen Schoenwaelder
19 <mailto:j.schoenwaelder@jacobs-university.de>
21 Editor: Juergen Schoenwaelder
22 <mailto:j.schoenwaelder@jacobs-university.de>";
25 "This module contains a collection of generally useful derived
28 Copyright (c) 2013 IETF Trust and the persons identified as
29 authors of the code. All rights reserved.
31 Redistribution and use in source and binary forms, with or
32 without modification, is permitted pursuant to, and subject
33 to the license terms contained in, the Simplified BSD License
34 set forth in Section 4.c of the IETF Trust''''s Legal Provisions
35 Relating to IETF Documents
36 (http://trustee.ietf.org/license-info).
38 This version of this YANG module is part of RFC 6991; see
39 the RFC itself for full legal notices.";
43 "This revision adds the following new data types:
49 "RFC 6991: Common YANG Data Types";
56 "RFC 6021: Common YANG Data Types";
59 /*** collection of counter and gauge types ***/
64 "The counter32 type represents a non-negative integer
65 that monotonically increases until it reaches a
66 maximum value of 2^32-1 (4294967295 decimal), when it
67 wraps around and starts increasing again from zero.
69 Counters have no defined ''''initial'''' value, and thus, a
70 single value of a counter has (in general) no information
71 content. Discontinuities in the monotonically increasing
72 value normally occur at re-initialization of the
73 management system, and at other times as specified in the
74 description of a schema node using this type. If such
75 other times can occur, for example, the creation of
76 a schema node of type counter32 at times other than
77 re-initialization, then a corresponding schema node
78 should be defined, with an appropriate type, to indicate
79 the last discontinuity.
81 The counter32 type should not be used for configuration
82 schema nodes. A default statement SHOULD NOT be used in
83 combination with the type counter32.
85 In the value set and its semantics, this type is equivalent
86 to the Counter32 type of the SMIv2.";
88 "RFC 2578: Structure of Management Information Version 2
92 typedef zero-based-counter32 {
96 "The zero-based-counter32 type represents a counter32
97 that has the defined ''''initial'''' value zero.
99 A schema node of this type will be set to zero (0) on creation
100 and will thereafter increase monotonically until it reaches
101 a maximum value of 2^32-1 (4294967295 decimal), when it
102 wraps around and starts increasing again from zero.
104 Provided that an application discovers a new schema node
105 of this type within the minimum time to wrap, it can use the
106 ''''initial'''' value as a delta. It is important for a management
107 station to be aware of this minimum time and the actual time
108 between polls, and to discard data if the actual time is too
109 long or there is no defined minimum time.
111 In the value set and its semantics, this type is equivalent
112 to the ZeroBasedCounter32 textual convention of the SMIv2.";
114 "RFC 4502: Remote Network Monitoring Management Information
121 "The counter64 type represents a non-negative integer
122 that monotonically increases until it reaches a
123 maximum value of 2^64-1 (18446744073709551615 decimal),
124 when it wraps around and starts increasing again from zero.
126 Counters have no defined ''''initial'''' value, and thus, a
127 single value of a counter has (in general) no information
128 content. Discontinuities in the monotonically increasing
129 value normally occur at re-initialization of the
130 management system, and at other times as specified in the
131 description of a schema node using this type. If such
132 other times can occur, for example, the creation of
133 a schema node of type counter64 at times other than
134 re-initialization, then a corresponding schema node
135 should be defined, with an appropriate type, to indicate
136 the last discontinuity.
138 The counter64 type should not be used for configuration
139 schema nodes. A default statement SHOULD NOT be used in
140 combination with the type counter64.
142 In the value set and its semantics, this type is equivalent
143 to the Counter64 type of the SMIv2.";
145 "RFC 2578: Structure of Management Information Version 2
149 typedef zero-based-counter64 {
153 "The zero-based-counter64 type represents a counter64 that
154 has the defined ''''initial'''' value zero.
159 A schema node of this type will be set to zero (0) on creation
160 and will thereafter increase monotonically until it reaches
161 a maximum value of 2^64-1 (18446744073709551615 decimal),
162 when it wraps around and starts increasing again from zero.
164 Provided that an application discovers a new schema node
165 of this type within the minimum time to wrap, it can use the
166 ''''initial'''' value as a delta. It is important for a management
167 station to be aware of this minimum time and the actual time
168 between polls, and to discard data if the actual time is too
169 long or there is no defined minimum time.
171 In the value set and its semantics, this type is equivalent
172 to the ZeroBasedCounter64 textual convention of the SMIv2.";
174 "RFC 2856: Textual Conventions for Additional High Capacity
181 "The gauge32 type represents a non-negative integer, which
182 may increase or decrease, but shall never exceed a maximum
183 value, nor fall below a minimum value. The maximum value
184 cannot be greater than 2^32-1 (4294967295 decimal), and
185 the minimum value cannot be smaller than 0. The value of
186 a gauge32 has its maximum value whenever the information
187 being modeled is greater than or equal to its maximum
188 value, and has its minimum value whenever the information
189 being modeled is smaller than or equal to its minimum value.
190 If the information being modeled subsequently decreases
191 below (increases above) the maximum (minimum) value, the
192 gauge32 also decreases (increases).
194 In the value set and its semantics, this type is equivalent
195 to the Gauge32 type of the SMIv2.";
197 "RFC 2578: Structure of Management Information Version 2
204 "The gauge64 type represents a non-negative integer, which
205 may increase or decrease, but shall never exceed a maximum
206 value, nor fall below a minimum value. The maximum value
207 cannot be greater than 2^64-1 (18446744073709551615), and
208 the minimum value cannot be smaller than 0. The value of
209 a gauge64 has its maximum value whenever the information
210 being modeled is greater than or equal to its maximum
211 value, and has its minimum value whenever the information
212 being modeled is smaller than or equal to its minimum value.
213 If the information being modeled subsequently decreases
214 below (increases above) the maximum (minimum) value, the
215 gauge64 also decreases (increases).
217 In the value set and its semantics, this type is equivalent
218 to the CounterBasedGauge64 SMIv2 textual convention defined
221 "RFC 2856: Textual Conventions for Additional High Capacity
225 /*** collection of identifier-related types ***/
227 typedef object-identifier {
229 pattern ''''(([0-1](.[1-3]?[0-9]))|(2.(0|([1-9]d*))))''''
230 + ''''(.(0|([1-9]d*)))*'''';
233 "The object-identifier type represents administratively
234 assigned names in a registration-hierarchical-name tree.
236 Values of this type are denoted as a sequence of numerical
237 non-negative sub-identifier values. Each sub-identifier
238 value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers
239 are separated by single dots and without any intermediate
242 The ASN.1 standard restricts the value space of the first
243 sub-identifier to 0, 1, or 2. Furthermore, the value space
244 of the second sub-identifier is restricted to the range
245 0 to 39 if the first sub-identifier is 0 or 1. Finally,
246 the ASN.1 standard requires that an object identifier
247 has always at least two sub-identifiers. The pattern
248 captures these restrictions.
250 Although the number of sub-identifiers is not limited,
251 module designers should realize that there may be
252 implementations that stick with the SMIv2 limit of 128
255 This type is a superset of the SMIv2 OBJECT IDENTIFIER type
256 since it is not restricted to 128 sub-identifiers. Hence,
257 this type SHOULD NOT be used to represent the SMIv2 OBJECT
258 IDENTIFIER type; the object-identifier-128 type SHOULD be
261 "ISO9834-1: Information technology -- Open Systems
262 Interconnection -- Procedures for the operation of OSI
263 Registration Authorities: General procedures and top
264 arcs of the ASN.1 Object Identifier tree";
267 typedef object-identifier-128 {
268 type object-identifier {
269 pattern ''''d*(.d*){1,127}'''';
272 "This type represents object-identifiers restricted to 128
275 In the value set and its semantics, this type is equivalent
276 to the OBJECT IDENTIFIER type of the SMIv2.";
278 "RFC 2578: Structure of Management Information Version 2
282 typedef yang-identifier {
285 pattern ''''[a-zA-Z_][a-zA-Z0-9-_.]*'''';
286 pattern ''''.|..|[^xX].*|.[^mM].*|..[^lL].*'''';
289 "A YANG identifier string as defined by the ''''identifier''''
290 rule in Section 12 of RFC 6020. An identifier must
291 start with an alphabetic character or an underscore
292 followed by an arbitrary sequence of alphabetic or
293 numeric characters, underscores, hyphens, or dots.
295 A YANG identifier MUST NOT start with any possible
296 combination of the lowercase or uppercase character
297 sequence ''''xml''''.";
299 "RFC 6020: YANG - A Data Modeling Language for the Network
300 Configuration Protocol (NETCONF)";
303 /*** collection of types related to date and time***/
305 typedef date-and-time {
307 pattern ''''d{4}-d{2}-d{2}Td{2}:d{2}:d{2}(.d+)?''''
308 + ''''(Z|[+-]d{2}:d{2})'''';
311 "The date-and-time type is a profile of the ISO 8601
312 standard for representation of dates and times using the
313 Gregorian calendar. The profile is defined by the
314 date-time production in Section 5.6 of RFC 3339.
316 The date-and-time type is compatible with the dateTime XML
317 schema type with the following notable exceptions:
319 (a) The date-and-time type does not allow negative years.
321 (b) The date-and-time time-offset -00:00 indicates an unknown
322 time zone (see RFC 3339) while -00:00 and +00:00 and Z
323 all represent the same time zone in dateTime.
325 (c) The canonical format (see below) of data-and-time values
326 differs from the canonical format used by the dateTime XML
327 schema type, which requires all times to be in UTC using
328 the time-offset ''''Z''''.
330 This type is not equivalent to the DateAndTime textual
331 convention of the SMIv2 since RFC 3339 uses a different
332 separator between full-date and full-time and provides
333 higher resolution of time-secfrac.
335 The canonical format for date-and-time values with a known time
336 zone uses a numeric time zone offset that is calculated using
337 the device''''s configured known offset to UTC time. A change of
338 the device''''s offset to UTC time will cause date-and-time values
339 to change accordingly. Such changes might happen periodically
340 in case a server follows automatically daylight saving time
341 (DST) time zone offset changes. The canonical format for
342 date-and-time values with an unknown time zone (usually
343 referring to the notion of local time) uses the time-offset
346 "RFC 3339: Date and Time on the Internet: Timestamps
347 RFC 2579: Textual Conventions for SMIv2
348 XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
354 "The timeticks type represents a non-negative integer that
355 represents the time, modulo 2^32 (4294967296 decimal), in
356 hundredths of a second between two epochs. When a schema
357 node is defined that uses this type, the description of
358 the schema node identifies both of the reference epochs.
360 In the value set and its semantics, this type is equivalent
361 to the TimeTicks type of the SMIv2.";
363 "RFC 2578: Structure of Management Information Version 2
370 "The timestamp type represents the value of an associated
371 timeticks schema node at which a specific occurrence
372 happened. The specific occurrence must be defined in the
373 description of any schema node defined using this type. When
374 the specific occurrence occurred prior to the last time the
375 associated timeticks attribute was zero, then the timestamp
376 value is zero. Note that this requires all timestamp values
377 to be reset to zero when the value of the associated timeticks
378 attribute reaches 497+ days and wraps around to zero.
380 The associated timeticks schema node must be specified
381 in the description of any schema node using this type.
383 In the value set and its semantics, this type is equivalent
384 to the TimeStamp textual convention of the SMIv2.";
386 "RFC 2579: Textual Conventions for SMIv2";
389 /*** collection of generic address types ***/
391 typedef phys-address {
393 pattern ''''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'''';
400 "Represents media- or physical-level addresses represented
401 as a sequence octets, each octet represented by two hexadecimal
402 numbers. Octets are separated by colons. The canonical
403 representation uses lowercase characters.
405 In the value set and its semantics, this type is equivalent
406 to the PhysAddress textual convention of the SMIv2.";
408 "RFC 2579: Textual Conventions for SMIv2";
411 typedef mac-address {
413 pattern ''''[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'''';
416 "The mac-address type represents an IEEE 802 MAC address.
417 The canonical representation uses lowercase characters.
419 In the value set and its semantics, this type is equivalent
420 to the MacAddress textual convention of the SMIv2.";
422 "IEEE 802: IEEE Standard for Local and Metropolitan Area
423 Networks: Overview and Architecture
424 RFC 2579: Textual Conventions for SMIv2";
427 /*** collection of XML-specific types ***/
432 "This type represents an XPATH 1.0 expression.
434 When a schema node is defined that uses this type, the
435 description of the schema node MUST specify the XPath
436 context in which the XPath expression is evaluated.";
438 "XPATH: XML Path Language (XPath) Version 1.0";
441 /*** collection of string types ***/
445 pattern ''''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'''';
448 "A hexadecimal string with octets represented as hex digits
449 separated by colons. The canonical representation uses
450 lowercase characters.";
455 pattern ''''[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-''''
456 + ''''[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'''';
459 "A Universally Unique IDentifier in the string representation
460 defined in RFC 4122. The canonical representation uses
461 lowercase characters.
463 The following is an example of a UUID in string representation:
464 f81d4fae-7dec-11d0-a765-00a0c91e6bf6
467 "RFC 4122: A Universally Unique IDentifier (UUID) URN
471 typedef dotted-quad {
474 ''''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}''''
475 + ''''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'''';
478 "An unsigned 32-bit number expressed in the dotted-quad
479 notation, i.e., four octets written as decimal numbers
480 and separated with the ''''.'''' (full stop) character.";
483 where name = 'ietf-yang-types.yang'
484 and checksum = '0c68c544f846c01751c71317339d02a504519ab05e45f50653605562df64295f';