1 <?xml version="1.0" encoding="UTF-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3 xmlns:yin="urn:ietf:params:xml:schema:yang:yin:1"
4 targetNamespace="urn:ietf:params:xml:ns:yang:ietf-yang-types"
5 xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-types"
6 elementFormDefault="qualified"
7 attributeFormDefault="unqualified"
10 xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types">
14 This schema was generated from the YANG module ietf-yang-types
17 The schema describes an instance document consisting
18 of the entire configuration data store, operational
19 data, rpc operations, and notifications.
20 This schema can thus NOT be used as-is to
21 validate NETCONF PDUs.
27 This module contains a collection of generally useful derived
30 Copyright (c) 2010 IETF Trust and the persons identified as
31 authors of the code. All rights reserved.
33 Redistribution and use in source and binary forms, with or without
34 modification, is permitted pursuant to, and subject to the license
35 terms contained in, the Simplified BSD License set forth in Section
36 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
37 (http://trustee.ietf.org/license-info).
39 This version of this YANG module is part of RFC 6021; see
40 the RFC itself for full legal notices.
44 <!-- YANG typedefs -->
46 <xs:simpleType name="counter32">
49 The counter32 type represents a non-negative integer
50 that monotonically increases until it reaches a
51 maximum value of 2^32-1 (4294967295 decimal), when it
52 wraps around and starts increasing again from zero.
54 Counters have no defined 'initial' value, and thus, a
55 single value of a counter has (in general) no information
56 content. Discontinuities in the monotonically increasing
57 value normally occur at re-initialization of the
58 management system, and at other times as specified in the
59 description of a schema node using this type. If such
60 other times can occur, for example, the creation of
61 a schema node of type counter32 at times other than
62 re-initialization, then a corresponding schema node
63 should be defined, with an appropriate type, to indicate
64 the last discontinuity.
66 The counter32 type should not be used for configuration
67 schema nodes. A default statement SHOULD NOT be used in
68 combination with the type counter32.
70 In the value set and its semantics, this type is equivalent
71 to the Counter32 type of the SMIv2.
75 <xs:restriction base="xs:unsignedInt">
79 <xs:simpleType name="zero-based-counter32">
82 The zero-based-counter32 type represents a counter32
83 that has the defined 'initial' value zero.
85 A schema node of this type will be set to zero (0) on creation
86 and will thereafter increase monotonically until it reaches
87 a maximum value of 2^32-1 (4294967295 decimal), when it
88 wraps around and starts increasing again from zero.
90 Provided that an application discovers a new schema node
91 of this type within the minimum time to wrap, it can use the
92 'initial' value as a delta. It is important for a management
93 station to be aware of this minimum time and the actual time
94 between polls, and to discard data if the actual time is too
95 long or there is no defined minimum time.
97 In the value set and its semantics, this type is equivalent
98 to the ZeroBasedCounter32 textual convention of the SMIv2.
102 <xs:restriction base="yang:counter32">
106 <xs:simpleType name="counter64">
109 The counter64 type represents a non-negative integer
110 that monotonically increases until it reaches a
111 maximum value of 2^64-1 (18446744073709551615 decimal),
112 when it wraps around and starts increasing again from zero.
114 Counters have no defined 'initial' value, and thus, a
115 single value of a counter has (in general) no information
116 content. Discontinuities in the monotonically increasing
117 value normally occur at re-initialization of the
118 management system, and at other times as specified in the
119 description of a schema node using this type. If such
120 other times can occur, for example, the creation of
121 a schema node of type counter64 at times other than
122 re-initialization, then a corresponding schema node
123 should be defined, with an appropriate type, to indicate
124 the last discontinuity.
126 The counter64 type should not be used for configuration
127 schema nodes. A default statement SHOULD NOT be used in
128 combination with the type counter64.
130 In the value set and its semantics, this type is equivalent
131 to the Counter64 type of the SMIv2.
135 <xs:restriction base="xs:unsignedLong">
139 <xs:simpleType name="zero-based-counter64">
142 The zero-based-counter64 type represents a counter64 that
143 has the defined 'initial' value zero.
145 A schema node of this type will be set to zero (0) on creation
146 and will thereafter increase monotonically until it reaches
147 a maximum value of 2^64-1 (18446744073709551615 decimal),
148 when it wraps around and starts increasing again from zero.
150 Provided that an application discovers a new schema node
151 of this type within the minimum time to wrap, it can use the
152 'initial' value as a delta. It is important for a management
153 station to be aware of this minimum time and the actual time
154 between polls, and to discard data if the actual time is too
155 long or there is no defined minimum time.
157 In the value set and its semantics, this type is equivalent
158 to the ZeroBasedCounter64 textual convention of the SMIv2.
162 <xs:restriction base="yang:counter64">
166 <xs:simpleType name="gauge32">
169 The gauge32 type represents a non-negative integer, which
170 may increase or decrease, but shall never exceed a maximum
171 value, nor fall below a minimum value. The maximum value
172 cannot be greater than 2^32-1 (4294967295 decimal), and
173 the minimum value cannot be smaller than 0. The value of
174 a gauge32 has its maximum value whenever the information
175 being modeled is greater than or equal to its maximum
176 value, and has its minimum value whenever the information
177 being modeled is smaller than or equal to its minimum value.
178 If the information being modeled subsequently decreases
179 below (increases above) the maximum (minimum) value, the
180 gauge32 also decreases (increases).
182 In the value set and its semantics, this type is equivalent
183 to the Gauge32 type of the SMIv2.
187 <xs:restriction base="xs:unsignedInt">
191 <xs:simpleType name="gauge64">
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
213 <xs:restriction base="xs:unsignedLong">
217 <xs:simpleType name="object-identifier">
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-identifier. 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
250 <xs:restriction base="xs:string">
251 <xs:pattern value="(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))(\.(0|([1-9]\d*)))*"/>
255 <xs:simpleType name="object-identifier-128">
258 This type represents object-identifiers restricted to 128
261 In the value set and its semantics, this type is equivalent
262 to the OBJECT IDENTIFIER type of the SMIv2.
266 <xs:restriction base="object-identifier">
267 <xs:pattern value="\d*(\.\d*){1,127}"/>
271 <xs:simpleType name="date-and-time">
274 The date-and-time type is a profile of the ISO 8601
275 standard for representation of dates and times using the
276 Gregorian calendar. The profile is defined by the
277 date-time production in Section 5.6 of RFC 3339.
279 The date-and-time type is compatible with the dateTime XML
280 schema type with the following notable exceptions:
282 (a) The date-and-time type does not allow negative years.
284 (b) The date-and-time time-offset -00:00 indicates an unknown
285 time zone (see RFC 3339) while -00:00 and +00:00 and Z all
286 represent the same time zone in dateTime.
288 (c) The canonical format (see below) of data-and-time values
289 differs from the canonical format used by the dateTime XML
290 schema type, which requires all times to be in UTC using the
293 This type is not equivalent to the DateAndTime textual
294 convention of the SMIv2 since RFC 3339 uses a different
295 separator between full-date and full-time and provides
296 higher resolution of time-secfrac.
298 The canonical format for date-and-time values with a known time
299 zone uses a numeric time zone offset that is calculated using
300 the device's configured known offset to UTC time. A change of
301 the device's offset to UTC time will cause date-and-time values
302 to change accordingly. Such changes might happen periodically
303 in case a server follows automatically daylight saving time
304 (DST) time zone offset changes. The canonical format for
305 date-and-time values with an unknown time zone (usually referring
306 to the notion of local time) uses the time-offset -00:00.
310 <xs:restriction base="xs:string">
311 <xs:pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]\d{2}:\d{2})"/>
315 <xs:simpleType name="timeticks">
318 The timeticks type represents a non-negative integer that
319 represents the time, modulo 2^32 (4294967296 decimal), in
320 hundredths of a second between two epochs. When a schema
321 node is defined that uses this type, the description of
322 the schema node identifies both of the reference epochs.
324 In the value set and its semantics, this type is equivalent
325 to the TimeTicks type of the SMIv2.
329 <xs:restriction base="xs:unsignedInt">
333 <xs:simpleType name="timestamp">
336 The timestamp type represents the value of an associated
337 timeticks schema node at which a specific occurrence happened.
338 The specific occurrence must be defined in the description
339 of any schema node defined using this type. When the specific
340 occurrence occurred prior to the last time the associated
341 timeticks attribute was zero, then the timestamp value is
342 zero. Note that this requires all timestamp values to be
343 reset to zero when the value of the associated timeticks
344 attribute reaches 497+ days and wraps around to zero.
346 The associated timeticks schema node must be specified
347 in the description of any schema node using this type.
349 In the value set and its semantics, this type is equivalent
350 to the TimeStamp textual convention of the SMIv2.
354 <xs:restriction base="yang:timeticks">
358 <xs:simpleType name="phys-address">
361 Represents media- or physical-level addresses represented
362 as a sequence octets, each octet represented by two hexadecimal
363 numbers. Octets are separated by colons. The canonical
364 representation uses lowercase characters.
366 In the value set and its semantics, this type is equivalent
367 to the PhysAddress textual convention of the SMIv2.
371 <xs:restriction base="xs:string">
372 <xs:pattern value="([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?"/>
376 <xs:simpleType name="mac-address">
379 The mac-address type represents an IEEE 802 MAC address.
380 The canonical representation uses lowercase characters.
382 In the value set and its semantics, this type is equivalent
383 to the MacAddress textual convention of the SMIv2.
387 <xs:restriction base="xs:string">
388 <xs:pattern value="[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}"/>
392 <xs:simpleType name="xpath1.0">
395 This type represents an XPATH 1.0 expression.
397 When a schema node is defined that uses this type, the
398 description of the schema node MUST specify the XPath
399 context in which the XPath expression is evaluated.
403 <xs:restriction base="xs:string">