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