1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2 <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">module ietf-yang-types {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
7 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
9 "WG Web: <http://tools.ietf.org/wg/netmod/>
10 WG List: <mailto:netmod@ietf.org>
12 WG Chair: David Kessens
13 <mailto:david.kessens@nsn.com>
15 WG Chair: Juergen Schoenwaelder
16 <mailto:j.schoenwaelder@jacobs-university.de>
18 Editor: Juergen Schoenwaelder
19 <mailto:j.schoenwaelder@jacobs-university.de>";
21 "This module contains a collection of generally useful derived
24 Copyright (c) 2013 IETF Trust and the persons identified as
25 authors of the code. All rights reserved.
27 Redistribution and use in source and binary forms, with or
28 without modification, is permitted pursuant to, and subject
29 to the license terms contained in, the Simplified BSD License
30 set forth in Section 4.c of the IETF Trust's Legal Provisions
31 Relating to IETF Documents
32 (http://trustee.ietf.org/license-info).
34 This version of this YANG module is part of RFC 6991; see
35 the RFC itself for full legal notices.";
39 "This revision adds the following new data types:
45 "RFC 6991: Common YANG Data Types";
51 "RFC 6021: Common YANG Data Types";
57 "The counter32 type represents a non-negative integer
58 that monotonically increases until it reaches a
59 maximum value of 2^32-1 (4294967295 decimal), when it
60 wraps around and starts increasing again from zero.
62 Counters have no defined 'initial' value, and thus, a
63 single value of a counter has (in general) no information
64 content. Discontinuities in the monotonically increasing
65 value normally occur at re-initialization of the
66 management system, and at other times as specified in the
67 description of a schema node using this type. If such
68 other times can occur, for example, the creation of
69 a schema node of type counter32 at times other than
70 re-initialization, then a corresponding schema node
71 should be defined, with an appropriate type, to indicate
72 the last discontinuity.
74 The counter32 type should not be used for configuration
75 schema nodes. A default statement SHOULD NOT be used in
76 combination with the type counter32.
78 In the value set and its semantics, this type is equivalent
79 to the Counter32 type of the SMIv2.";
81 "RFC 2578: Structure of Management Information Version 2
85 typedef zero-based-counter32 {
89 "The zero-based-counter32 type represents a counter32
90 that has the defined 'initial' value zero.
92 A schema node of this type will be set to zero (0) on creation
93 and will thereafter increase monotonically until it reaches
94 a maximum value of 2^32-1 (4294967295 decimal), when it
95 wraps around and starts increasing again from zero.
97 Provided that an application discovers a new schema node
98 of this type within the minimum time to wrap, it can use the
99 'initial' value as a delta. It is important for a management
100 station to be aware of this minimum time and the actual time
101 between polls, and to discard data if the actual time is too
102 long or there is no defined minimum time.
104 In the value set and its semantics, this type is equivalent
105 to the ZeroBasedCounter32 textual convention of the SMIv2.";
107 "RFC 4502: Remote Network Monitoring Management Information
114 "The counter64 type represents a non-negative integer
115 that monotonically increases until it reaches a
116 maximum value of 2^64-1 (18446744073709551615 decimal),
117 when it wraps around and starts increasing again from zero.
119 Counters have no defined 'initial' value, and thus, a
120 single value of a counter has (in general) no information
121 content. Discontinuities in the monotonically increasing
122 value normally occur at re-initialization of the
123 management system, and at other times as specified in the
124 description of a schema node using this type. If such
125 other times can occur, for example, the creation of
126 a schema node of type counter64 at times other than
127 re-initialization, then a corresponding schema node
128 should be defined, with an appropriate type, to indicate
129 the last discontinuity.
131 The counter64 type should not be used for configuration
132 schema nodes. A default statement SHOULD NOT be used in
133 combination with the type counter64.
135 In the value set and its semantics, this type is equivalent
136 to the Counter64 type of the SMIv2.";
138 "RFC 2578: Structure of Management Information Version 2
142 typedef zero-based-counter64 {
146 "The zero-based-counter64 type represents a counter64 that
147 has the defined 'initial' value zero.
149 A schema node of this type will be set to zero (0) on creation
150 and will thereafter increase monotonically until it reaches
151 a maximum value of 2^64-1 (18446744073709551615 decimal),
152 when it wraps around and starts increasing again from zero.
154 Provided that an application discovers a new schema node
155 of this type within the minimum time to wrap, it can use the
156 'initial' value as a delta. It is important for a management
157 station to be aware of this minimum time and the actual time
158 between polls, and to discard data if the actual time is too
159 long or there is no defined minimum time.
161 In the value set and its semantics, this type is equivalent
162 to the ZeroBasedCounter64 textual convention of the SMIv2.";
164 "RFC 2856: Textual Conventions for Additional High Capacity
171 "The gauge32 type represents a non-negative integer, which
172 may increase or decrease, but shall never exceed a maximum
173 value, nor fall below a minimum value. The maximum value
174 cannot be greater than 2^32-1 (4294967295 decimal), and
175 the minimum value cannot be smaller than 0. The value of
176 a gauge32 has its maximum value whenever the information
177 being modeled is greater than or equal to its maximum
178 value, and has its minimum value whenever the information
179 being modeled is smaller than or equal to its minimum value.
180 If the information being modeled subsequently decreases
181 below (increases above) the maximum (minimum) value, the
182 gauge32 also decreases (increases).
184 In the value set and its semantics, this type is equivalent
185 to the Gauge32 type of the SMIv2.";
187 "RFC 2578: Structure of Management Information Version 2
194 "The gauge64 type represents a non-negative integer, which
195 may increase or decrease, but shall never exceed a maximum
196 value, nor fall below a minimum value. The maximum value
197 cannot be greater than 2^64-1 (18446744073709551615), and
198 the minimum value cannot be smaller than 0. The value of
199 a gauge64 has its maximum value whenever the information
200 being modeled is greater than or equal to its maximum
201 value, and has its minimum value whenever the information
202 being modeled is smaller than or equal to its minimum value.
203 If the information being modeled subsequently decreases
204 below (increases above) the maximum (minimum) value, the
205 gauge64 also decreases (increases).
207 In the value set and its semantics, this type is equivalent
208 to the CounterBasedGauge64 SMIv2 textual convention defined
211 "RFC 2856: Textual Conventions for Additional High Capacity
215 typedef object-identifier {
217 pattern "(([0-1](\\.[1-3]?[0-9]))|(2\\.(0|([1-9]\\d*))))(\\.(0|([1-9]\\d*)))*";
220 "The object-identifier type represents administratively
221 assigned names in a registration-hierarchical-name tree.
223 Values of this type are denoted as a sequence of numerical
224 non-negative sub-identifier values. Each sub-identifier
225 value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers
226 are separated by single dots and without any intermediate
229 The ASN.1 standard restricts the value space of the first
230 sub-identifier to 0, 1, or 2. Furthermore, the value space
231 of the second sub-identifier is restricted to the range
232 0 to 39 if the first sub-identifier is 0 or 1. Finally,
233 the ASN.1 standard requires that an object identifier
234 has always at least two sub-identifiers. The pattern
235 captures these restrictions.
237 Although the number of sub-identifiers is not limited,
238 module designers should realize that there may be
239 implementations that stick with the SMIv2 limit of 128
242 This type is a superset of the SMIv2 OBJECT IDENTIFIER type
243 since it is not restricted to 128 sub-identifiers. Hence,
244 this type SHOULD NOT be used to represent the SMIv2 OBJECT
245 IDENTIFIER type; the object-identifier-128 type SHOULD be
248 "ISO9834-1: Information technology -- Open Systems
249 Interconnection -- Procedures for the operation of OSI
250 Registration Authorities: General procedures and top
251 arcs of the ASN.1 Object Identifier tree";
254 typedef object-identifier-128 {
255 type object-identifier {
256 pattern "\\d*(\\.\\d*){1,127}";
259 "This type represents object-identifiers restricted to 128
262 In the value set and its semantics, this type is equivalent
263 to the OBJECT IDENTIFIER type of the SMIv2.";
265 "RFC 2578: Structure of Management Information Version 2
269 typedef yang-identifier {
272 pattern "[a-zA-Z_][a-zA-Z0-9\\-_.]*";
273 pattern ".|..|[^xX].*|.[^mM].*|..[^lL].*";
276 "A YANG identifier string as defined by the 'identifier'
277 rule in Section 12 of RFC 6020. An identifier must
278 start with an alphabetic character or an underscore
279 followed by an arbitrary sequence of alphabetic or
280 numeric characters, underscores, hyphens, or dots.
282 A YANG identifier MUST NOT start with any possible
283 combination of the lowercase or uppercase character
286 "RFC 6020: YANG - A Data Modeling Language for the Network
287 Configuration Protocol (NETCONF)";
290 typedef date-and-time {
292 pattern "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})";
295 "The date-and-time type is a profile of the ISO 8601
296 standard for representation of dates and times using the
297 Gregorian calendar. The profile is defined by the
298 date-time production in Section 5.6 of RFC 3339.
300 The date-and-time type is compatible with the dateTime XML
301 schema type with the following notable exceptions:
303 (a) The date-and-time type does not allow negative years.
305 (b) The date-and-time time-offset -00:00 indicates an unknown
306 time zone (see RFC 3339) while -00:00 and +00:00 and Z
307 all represent the same time zone in dateTime.
309 (c) The canonical format (see below) of data-and-time values
310 differs from the canonical format used by the dateTime XML
311 schema type, which requires all times to be in UTC using
314 This type is not equivalent to the DateAndTime textual
315 convention of the SMIv2 since RFC 3339 uses a different
316 separator between full-date and full-time and provides
317 higher resolution of time-secfrac.
319 The canonical format for date-and-time values with a known time
320 zone uses a numeric time zone offset that is calculated using
321 the device's configured known offset to UTC time. A change of
322 the device's offset to UTC time will cause date-and-time values
323 to change accordingly. Such changes might happen periodically
324 in case a server follows automatically daylight saving time
325 (DST) time zone offset changes. The canonical format for
326 date-and-time values with an unknown time zone (usually
327 referring to the notion of local time) uses the time-offset
330 "RFC 3339: Date and Time on the Internet: Timestamps
331 RFC 2579: Textual Conventions for SMIv2
332 XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
338 "The timeticks type represents a non-negative integer that
339 represents the time, modulo 2^32 (4294967296 decimal), in
340 hundredths of a second between two epochs. When a schema
341 node is defined that uses this type, the description of
342 the schema node identifies both of the reference epochs.
344 In the value set and its semantics, this type is equivalent
345 to the TimeTicks type of the SMIv2.";
347 "RFC 2578: Structure of Management Information Version 2
354 "The timestamp type represents the value of an associated
355 timeticks schema node at which a specific occurrence
356 happened. The specific occurrence must be defined in the
357 description of any schema node defined using this type. When
358 the specific occurrence occurred prior to the last time the
359 associated timeticks attribute was zero, then the timestamp
360 value is zero. Note that this requires all timestamp values
361 to be reset to zero when the value of the associated timeticks
362 attribute reaches 497+ days and wraps around to zero.
364 The associated timeticks schema node must be specified
365 in the description of any schema node using this type.
367 In the value set and its semantics, this type is equivalent
368 to the TimeStamp textual convention of the SMIv2.";
370 "RFC 2579: Textual Conventions for SMIv2";
373 typedef phys-address {
375 pattern "([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?";
378 "Represents media- or physical-level addresses represented
379 as a sequence octets, each octet represented by two hexadecimal
380 numbers. Octets are separated by colons. The canonical
381 representation uses lowercase characters.
383 In the value set and its semantics, this type is equivalent
384 to the PhysAddress textual convention of the SMIv2.";
386 "RFC 2579: Textual Conventions for SMIv2";
389 typedef mac-address {
391 pattern "[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}";
394 "The mac-address type represents an IEEE 802 MAC address.
395 The canonical representation uses lowercase characters.
397 In the value set and its semantics, this type is equivalent
398 to the MacAddress textual convention of the SMIv2.";
400 "IEEE 802: IEEE Standard for Local and Metropolitan Area
401 Networks: Overview and Architecture
402 RFC 2579: Textual Conventions for SMIv2";
408 "This type represents an XPATH 1.0 expression.
410 When a schema node is defined that uses this type, the
411 description of the schema node MUST specify the XPath
412 context in which the XPath expression is evaluated.";
414 "XPATH: XML Path Language (XPath) Version 1.0";
419 pattern "([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?";
422 "A hexadecimal string with octets represented as hex digits
423 separated by colons. The canonical representation uses
424 lowercase characters.";
429 pattern "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
432 "A Universally Unique IDentifier in the string representation
433 defined in RFC 4122. The canonical representation uses
434 lowercase characters.
436 The following is an example of a UUID in string representation:
437 f81d4fae-7dec-11d0-a765-00a0c91e6bf6
440 "RFC 4122: A Universally Unique IDentifier (UUID) URN
444 typedef dotted-quad {
446 pattern "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
449 "An unsigned 32-bit number expressed in the dotted-quad
450 notation, i.e., four octets written as decimal numbers
451 and separated with the '.' (full stop) character.";