Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / resources / semantic-statement-parser / yin / modules / ietf-yang-types@2013-05-16.yin
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <module name="ietf-yang-types"\r
3         xmlns="urn:ietf:params:xml:ns:yang:yin:1"\r
4         xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types">\r
5   <namespace uri="urn:ietf:params:xml:ns:yang:ietf-yang-types"/>\r
6   <prefix value="yang"/>\r
7   <organization>\r
8     <text>IETF NETMOD (NETCONF Data Modeling Language) Working Group</text>\r
9   </organization>\r
10   <contact>\r
11     <text>WG Web:   &lt;http://tools.ietf.org/wg/netmod/&gt;\r
12 WG List:  &lt;mailto:netmod@ietf.org&gt;\r
13 \r
14 WG Chair: David Kessens\r
15           &lt;mailto:david.kessens@nsn.com&gt;\r
16 \r
17 WG Chair: Juergen Schoenwaelder\r
18           &lt;mailto:j.schoenwaelder@jacobs-university.de&gt;\r
19 \r
20 Editor:   Juergen Schoenwaelder\r
21           &lt;mailto:j.schoenwaelder@jacobs-university.de&gt;</text>\r
22   </contact>\r
23   <description>\r
24     <text>This module contains a collection of generally useful derived\r
25 YANG data types.\r
26 \r
27 Copyright (c) 2013 IETF Trust and the persons identified as\r
28 authors of the code.  All rights reserved.\r
29 \r
30 Redistribution and use in source and binary forms, with or\r
31 without modification, is permitted pursuant to, and subject\r
32 to the license terms contained in, the Simplified BSD License\r
33 set forth in Section 4.c of the IETF Trust's Legal Provisions\r
34 Relating to IETF Documents\r
35 (http://trustee.ietf.org/license-info).\r
36 \r
37 This version of this YANG module is part of RFC XXXX; see\r
38 the RFC itself for full legal notices.</text>\r
39   </description>\r
40   <revision date="2013-05-16">\r
41     <description>\r
42       <text>This revision adds the following new data types:\r
43 - yang-identifier\r
44 - hex-string\r
45 - uuid\r
46 - dotted-quad</text>\r
47     </description>\r
48     <reference>\r
49       <text>RFC XXXX: Common YANG Data Types</text>\r
50     </reference>\r
51   </revision>\r
52   <revision date="2010-09-24">\r
53     <description>\r
54       <text>Initial revision.</text>\r
55     </description>\r
56     <reference>\r
57       <text>RFC 6021: Common YANG Data Types</text>\r
58     </reference>\r
59   </revision>\r
60   <typedef name="counter32">\r
61     <type name="uint32"/>\r
62     <description>\r
63       <text>The counter32 type represents a non-negative integer\r
64 that monotonically increases until it reaches a\r
65 maximum value of 2^32-1 (4294967295 decimal), when it\r
66 wraps around and starts increasing again from zero.\r
67 \r
68 Counters have no defined 'initial' value, and thus, a\r
69 single value of a counter has (in general) no information\r
70 content.  Discontinuities in the monotonically increasing\r
71 value normally occur at re-initialization of the\r
72 management system, and at other times as specified in the\r
73 description of a schema node using this type.  If such\r
74 other times can occur, for example, the creation of\r
75 a schema node of type counter32 at times other than\r
76 re-initialization, then a corresponding schema node\r
77 should be defined, with an appropriate type, to indicate\r
78 the last discontinuity.\r
79 \r
80 The counter32 type should not be used for configuration\r
81 schema nodes.  A default statement SHOULD NOT be used in\r
82 combination with the type counter32.\r
83 \r
84 In the value set and its semantics, this type is equivalent\r
85 to the Counter32 type of the SMIv2.</text>\r
86     </description>\r
87     <reference>\r
88       <text>RFC 2578: Structure of Management Information Version 2\r
89           (SMIv2)</text>\r
90     </reference>\r
91   </typedef>\r
92   <typedef name="zero-based-counter32">\r
93     <type name="yang:counter32"/>\r
94     <default value="0"/>\r
95     <description>\r
96       <text>The zero-based-counter32 type represents a counter32\r
97 that has the defined 'initial' value zero.\r
98 \r
99 A schema node of this type will be set to zero (0) on creation\r
100 and will thereafter increase monotonically until it reaches\r
101 a maximum value of 2^32-1 (4294967295 decimal), when it\r
102 wraps around and starts increasing again from zero.\r
103 \r
104 Provided that an application discovers a new schema node\r
105 of this type within the minimum time to wrap, it can use the\r
106 'initial' value as a delta.  It is important for a management\r
107 station to be aware of this minimum time and the actual time\r
108 between polls, and to discard data if the actual time is too\r
109 long or there is no defined minimum time.\r
110 \r
111 In the value set and its semantics, this type is equivalent\r
112 to the ZeroBasedCounter32 textual convention of the SMIv2.</text>\r
113     </description>\r
114     <reference>\r
115       <text>RFC 4502: Remote Network Monitoring Management Information\r
116           Base Version 2</text>\r
117     </reference>\r
118   </typedef>\r
119   <typedef name="counter64">\r
120     <type name="uint64"/>\r
121     <description>\r
122       <text>The counter64 type represents a non-negative integer\r
123 that monotonically increases until it reaches a\r
124 maximum value of 2^64-1 (18446744073709551615 decimal),\r
125 when it wraps around and starts increasing again from zero.\r
126 \r
127 Counters have no defined 'initial' value, and thus, a\r
128 single value of a counter has (in general) no information\r
129 content.  Discontinuities in the monotonically increasing\r
130 value normally occur at re-initialization of the\r
131 management system, and at other times as specified in the\r
132 description of a schema node using this type.  If such\r
133 other times can occur, for example, the creation of\r
134 a schema node of type counter64 at times other than\r
135 re-initialization, then a corresponding schema node\r
136 should be defined, with an appropriate type, to indicate\r
137 the last discontinuity.\r
138 \r
139 The counter64 type should not be used for configuration\r
140 schema nodes.  A default statement SHOULD NOT be used in\r
141 combination with the type counter64.\r
142 \r
143 In the value set and its semantics, this type is equivalent\r
144 to the Counter64 type of the SMIv2.</text>\r
145     </description>\r
146     <reference>\r
147       <text>RFC 2578: Structure of Management Information Version 2\r
148           (SMIv2)</text>\r
149     </reference>\r
150   </typedef>\r
151   <typedef name="zero-based-counter64">\r
152     <type name="yang:counter64"/>\r
153     <default value="0"/>\r
154     <description>\r
155       <text>The zero-based-counter64 type represents a counter64 that\r
156 has the defined 'initial' value zero.\r
157 \r
158 A schema node of this type will be set to zero (0) on creation\r
159 and will thereafter increase monotonically until it reaches\r
160 a maximum value of 2^64-1 (18446744073709551615 decimal),\r
161 when it wraps around and starts increasing again from zero.\r
162 \r
163 Provided that an application discovers a new schema node\r
164 of this type within the minimum time to wrap, it can use the\r
165 'initial' value as a delta.  It is important for a management\r
166 station to be aware of this minimum time and the actual time\r
167 between polls, and to discard data if the actual time is too\r
168 long or there is no defined minimum time.\r
169 \r
170 In the value set and its semantics, this type is equivalent\r
171 to the ZeroBasedCounter64 textual convention of the SMIv2.</text>\r
172     </description>\r
173     <reference>\r
174       <text>RFC 2856: Textual Conventions for Additional High Capacity\r
175           Data Types</text>\r
176     </reference>\r
177   </typedef>\r
178   <typedef name="gauge32">\r
179     <type name="uint32"/>\r
180     <description>\r
181       <text>The gauge32 type represents a non-negative integer, which\r
182 may increase or decrease, but shall never exceed a maximum\r
183 value, nor fall below a minimum value.  The maximum value\r
184 cannot be greater than 2^32-1 (4294967295 decimal), and\r
185 the minimum value cannot be smaller than 0.  The value of\r
186 a gauge32 has its maximum value whenever the information\r
187 being modeled is greater than or equal to its maximum\r
188 value, and has its minimum value whenever the information\r
189 being modeled is smaller than or equal to its minimum value.\r
190 If the information being modeled subsequently decreases\r
191 below (increases above) the maximum (minimum) value, the\r
192 gauge32 also decreases (increases).\r
193 \r
194 In the value set and its semantics, this type is equivalent\r
195 to the Gauge32 type of the SMIv2.</text>\r
196     </description>\r
197     <reference>\r
198       <text>RFC 2578: Structure of Management Information Version 2\r
199           (SMIv2)</text>\r
200     </reference>\r
201   </typedef>\r
202   <typedef name="gauge64">\r
203     <type name="uint64"/>\r
204     <description>\r
205       <text>The gauge64 type represents a non-negative integer, which\r
206 may increase or decrease, but shall never exceed a maximum\r
207 value, nor fall below a minimum value.  The maximum value\r
208 cannot be greater than 2^64-1 (18446744073709551615), and\r
209 the minimum value cannot be smaller than 0.  The value of\r
210 a gauge64 has its maximum value whenever the information\r
211 being modeled is greater than or equal to its maximum\r
212 value, and has its minimum value whenever the information\r
213 being modeled is smaller than or equal to its minimum value.\r
214 If the information being modeled subsequently decreases\r
215 below (increases above) the maximum (minimum) value, the\r
216 gauge64 also decreases (increases).\r
217 \r
218 In the value set and its semantics, this type is equivalent\r
219 to the CounterBasedGauge64 SMIv2 textual convention defined\r
220 in RFC 2856</text>\r
221     </description>\r
222     <reference>\r
223       <text>RFC 2856: Textual Conventions for Additional High Capacity\r
224           Data Types</text>\r
225     </reference>\r
226   </typedef>\r
227   <typedef name="object-identifier">\r
228     <type name="string">\r
229       <pattern value="(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))(\.(0|([1-9]\d*)))*"/>\r
230     </type>\r
231     <description>\r
232       <text>The object-identifier type represents administratively\r
233 assigned names in a registration-hierarchical-name tree.\r
234 \r
235 Values of this type are denoted as a sequence of numerical\r
236 non-negative sub-identifier values.  Each sub-identifier\r
237 value MUST NOT exceed 2^32-1 (4294967295).  Sub-identifiers\r
238 are separated by single dots and without any intermediate\r
239 whitespace.\r
240 \r
241 The ASN.1 standard restricts the value space of the first\r
242 sub-identifier to 0, 1, or 2.  Furthermore, the value space\r
243 of the second sub-identifier is restricted to the range\r
244 0 to 39 if the first sub-identifier is 0 or 1.  Finally,\r
245 the ASN.1 standard requires that an object identifier\r
246 has always at least two sub-identifier.  The pattern\r
247 captures these restrictions.\r
248 \r
249 Although the number of sub-identifiers is not limited,\r
250 module designers should realize that there may be\r
251 implementations that stick with the SMIv2 limit of 128\r
252 sub-identifiers.\r
253 \r
254 This type is a superset of the SMIv2 OBJECT IDENTIFIER type\r
255 since it is not restricted to 128 sub-identifiers.  Hence,\r
256 this type SHOULD NOT be used to represent the SMIv2 OBJECT\r
257 IDENTIFIER type, the object-identifier-128 type SHOULD be\r
258 used instead.</text>\r
259     </description>\r
260     <reference>\r
261       <text>ISO9834-1: Information technology -- Open Systems\r
262 Interconnection -- Procedures for the operation of OSI\r
263 Registration Authorities: General procedures and top\r
264 arcs of the ASN.1 Object Identifier tree</text>\r
265     </reference>\r
266   </typedef>\r
267   <typedef name="object-identifier-128">\r
268     <type name="object-identifier">\r
269       <pattern value="\d*(\.\d*){1,127}"/>\r
270     </type>\r
271     <description>\r
272       <text>This type represents object-identifiers restricted to 128\r
273 sub-identifiers.\r
274 \r
275 In the value set and its semantics, this type is equivalent\r
276 to the OBJECT IDENTIFIER type of the SMIv2.</text>\r
277     </description>\r
278     <reference>\r
279       <text>RFC 2578: Structure of Management Information Version 2\r
280           (SMIv2)</text>\r
281     </reference>\r
282   </typedef>\r
283   <typedef name="yang-identifier">\r
284     <type name="string">\r
285       <length value="1..max"/>\r
286       <pattern value="[a-zA-Z_][a-zA-Z0-9\-_.]*"/>\r
287       <pattern value=".|..|[^xX].*|.[^mM].*|..[^lL].*"/>\r
288     </type>\r
289     <description>\r
290       <text>A YANG identifier string as defined in RFC 6020, page 163.\r
291 An identifier must start with an alphabetic character or\r
292 an underscore followed by an arbitrary sequence of\r
293 alphabetic or numeric characters, underscores, hyphens\r
294 or dots.\r
295 \r
296 A YANG identifier MUST NOT start with any possible\r
297 combination of the lower-case or upper-case character\r
298 sequence 'xml'.</text>\r
299     </description>\r
300     <reference>\r
301       <text>RFC 6020: YANG - A Data Modeling Language for the Network\r
302           Configuration Protocol (NETCONF)</text>\r
303     </reference>\r
304   </typedef>\r
305   <typedef name="date-and-time">\r
306     <type name="string">\r
307       <pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]\d{2}:\d{2})"/>\r
308     </type>\r
309     <description>\r
310       <text>The date-and-time type is a profile of the ISO 8601\r
311 standard for representation of dates and times using the\r
312 Gregorian calendar.  The profile is defined by the\r
313 date-time production in Section 5.6 of RFC 3339.\r
314 \r
315 The date-and-time type is compatible with the dateTime XML\r
316 schema type with the following notable exceptions:\r
317 \r
318 (a) The date-and-time type does not allow negative years.\r
319 \r
320 (b) The date-and-time time-offset -00:00 indicates an unknown\r
321     time zone (see RFC 3339) while -00:00 and +00:00 and Z all\r
322     represent the same time zone in dateTime.\r
323 \r
324 (c) The canonical format (see below) of data-and-time values\r
325     differs from the canonical format used by the dateTime XML\r
326     schema type, which requires all times to be in UTC using\r
327     the time-offset 'Z'.\r
328 \r
329 This type is not equivalent to the DateAndTime textual\r
330 convention of the SMIv2 since RFC 3339 uses a different\r
331 separator between full-date and full-time and provides\r
332 higher resolution of time-secfrac.\r
333 The canonical format for date-and-time values with a known time\r
334 zone uses a numeric time zone offset that is calculated using\r
335 the device's configured known offset to UTC time.  A change of\r
336 the device's offset to UTC time will cause date-and-time values\r
337 to change accordingly.  Such changes might happen periodically\r
338 in case a server follows automatically daylight saving time\r
339 (DST) time zone offset changes.  The canonical format for\r
340 date-and-time values with an unknown time zone (usually\r
341 referring to the notion of local time) uses the time-offset\r
342 -00:00.</text>\r
343     </description>\r
344     <reference>\r
345       <text>RFC 3339: Date and Time on the Internet: Timestamps\r
346 RFC 2579: Textual Conventions for SMIv2\r
347 XSD-TYPES: XML Schema Part 2: Datatypes Second Edition</text>\r
348     </reference>\r
349   </typedef>\r
350   <typedef name="timeticks">\r
351     <type name="uint32"/>\r
352     <description>\r
353       <text>The timeticks type represents a non-negative integer that\r
354 represents the time, modulo 2^32 (4294967296 decimal), in\r
355 hundredths of a second between two epochs.  When a schema\r
356 node is defined that uses this type, the description of\r
357 the schema node identifies both of the reference epochs.\r
358 \r
359 In the value set and its semantics, this type is equivalent\r
360 to the TimeTicks type of the SMIv2.</text>\r
361     </description>\r
362     <reference>\r
363       <text>RFC 2578: Structure of Management Information Version 2\r
364           (SMIv2)</text>\r
365     </reference>\r
366   </typedef>\r
367   <typedef name="timestamp">\r
368     <type name="yang:timeticks"/>\r
369     <description>\r
370       <text>The timestamp type represents the value of an associated\r
371 timeticks schema node at which a specific occurrence\r
372 happened. The specific occurrence must be defined in the\r
373 description of any schema node defined using this type.  When\r
374 the specific occurrence occurred prior to the last time the\r
375 associated timeticks attribute was zero, then the timestamp\r
376 value is zero.  Note that this requires all timestamp values\r
377 to be reset to zero when the value of the associated timeticks\r
378 attribute reaches 497+ days and wraps around to zero.\r
379 \r
380 The associated timeticks schema node must be specified\r
381 in the description of any schema node using this type.\r
382 In the value set and its semantics, this type is equivalent\r
383 to the TimeStamp textual convention of the SMIv2.</text>\r
384     </description>\r
385     <reference>\r
386       <text>RFC 2579: Textual Conventions for SMIv2</text>\r
387     </reference>\r
388   </typedef>\r
389   <typedef name="phys-address">\r
390     <type name="string">\r
391       <pattern value="([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?"/>\r
392     </type>\r
393     <description>\r
394       <text>Represents media- or physical-level addresses represented\r
395 as a sequence octets, each octet represented by two hexadecimal\r
396 numbers.  Octets are separated by colons.  The canonical\r
397 representation uses lowercase characters.\r
398 \r
399 In the value set and its semantics, this type is equivalent\r
400 to the PhysAddress textual convention of the SMIv2.</text>\r
401     </description>\r
402     <reference>\r
403       <text>RFC 2579: Textual Conventions for SMIv2</text>\r
404     </reference>\r
405   </typedef>\r
406   <typedef name="mac-address">\r
407     <type name="string">\r
408       <pattern value="[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}"/>\r
409     </type>\r
410     <description>\r
411       <text>The mac-address type represents an IEEE 802 MAC address.\r
412 The canonical representation uses lowercase characters.\r
413 \r
414 In the value set and its semantics, this type is equivalent\r
415 to the MacAddress textual convention of the SMIv2.</text>\r
416     </description>\r
417     <reference>\r
418       <text>IEEE 802: IEEE Standard for Local and Metropolitan Area\r
419           Networks: Overview and Architecture\r
420 RFC 2579: Textual Conventions for SMIv2</text>\r
421     </reference>\r
422   </typedef>\r
423   <typedef name="xpath1.0">\r
424     <type name="string"/>\r
425     <description>\r
426       <text>This type represents an XPATH 1.0 expression.\r
427 \r
428 When a schema node is defined that uses this type, the\r
429 description of the schema node MUST specify the XPath\r
430 context in which the XPath expression is evaluated.</text>\r
431     </description>\r
432     <reference>\r
433       <text>XPATH: XML Path Language (XPath) Version 1.0</text>\r
434     </reference>\r
435   </typedef>\r
436   <typedef name="hex-string">\r
437     <type name="string">\r
438       <pattern value="([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?"/>\r
439     </type>\r
440     <description>\r
441       <text>A hexadecimal string with octets represented as hex digits\r
442 separated by colons.  The canonical representation uses\r
443 lowercase characters.</text>\r
444     </description>\r
445   </typedef>\r
446   <typedef name="uuid">\r
447     <type name="string">\r
448       <pattern value="[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}"/>\r
449     </type>\r
450     <description>\r
451       <text>A Universally Unique IDentifier in the string representation\r
452 defined in RFC 4122.  The canonical representation uses\r
453 lowercase characters.\r
454 \r
455 The following is an example of a UUID in string representation:\r
456 f81d4fae-7dec-11d0-a765-00a0c91e6bf6\r
457 </text>\r
458     </description>\r
459     <reference>\r
460       <text>RFC 4122: A Universally Unique IDentifier (UUID) URN\r
461           Namespace</text>\r
462     </reference>\r
463   </typedef>\r
464   <typedef name="dotted-quad">\r
465     <type name="string">\r
466       <pattern value="(([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])"/>\r
467     </type>\r
468     <description>\r
469       <text>An unsigned 32-bit number expressed in the dotted-quad\r
470 notation, i.e., four octets written as decimal numbers\r
471 and separated with the '.' (full stop) character.</text>\r
472     </description>\r
473   </typedef>\r
474 </module>\r