db79f0df5a737c6cc5175d709bd7b5621ea89ede
[cps.git] / cps-ri / src / main / resources / changelog / db / changes / 08-update-yang-resources-ietf-yang-types-rollback.sql
1 update yang_resource set
2 checksum = '25516798613f862ad20831e59ba02b75ecdc9c6f5547ed5d90bda76143bf0112',
3 content = 'module ietf-yang-types {
4
5   namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
6   prefix "yang";
7
8   organization
9    "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
10
11   contact
12    "WG Web:   <http://tools.ietf.org/wg/netmod/>
13     WG List:  <mailto:netmod@ietf.org>
14
15     WG Chair: David Kessens
16               <mailto:david.kessens@nsn.com>
17
18     WG Chair: Juergen Schoenwaelder
19               <mailto:j.schoenwaelder@jacobs-university.de>
20
21     Editor:   Juergen Schoenwaelder
22               <mailto:j.schoenwaelder@jacobs-university.de>";
23
24   description
25    "This module contains a collection of generally useful derived
26     YANG data types.
27
28     Copyright (c) 2013 IETF Trust and the persons identified as
29     authors of the code.  All rights reserved.
30
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).
37
38     This version of this YANG module is part of RFC 6991; see
39     the RFC itself for full legal notices.";
40
41   revision 2013-07-15 {
42     description
43      "This revision adds the following new data types:
44       - yang-identifier
45       - hex-string
46       - uuid
47       - dotted-quad";
48     reference
49      "RFC 6991: Common YANG Data Types";
50   }
51
52   revision 2010-09-24 {
53     description
54      "Initial revision.";
55     reference
56      "RFC 6021: Common YANG Data Types";
57   }
58
59   /*** collection of counter and gauge types ***/
60
61   typedef counter32 {
62     type uint32;
63     description
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.
68
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.
80
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.
84
85       In the value set and its semantics, this type is equivalent
86       to the Counter32 type of the SMIv2.";
87     reference
88      "RFC 2578: Structure of Management Information Version 2
89                 (SMIv2)";
90   }
91
92   typedef zero-based-counter32 {
93     type yang:counter32;
94     default "0";
95     description
96      "The zero-based-counter32 type represents a counter32
97       that has the defined ''''initial'''' value zero.
98
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.
103
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.
110
111       In the value set and its semantics, this type is equivalent
112       to the ZeroBasedCounter32 textual convention of the SMIv2.";
113     reference
114       "RFC 4502: Remote Network Monitoring Management Information
115                  Base Version 2";
116   }
117
118   typedef counter64 {
119     type uint64;
120     description
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.
125
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.
137
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.
141
142       In the value set and its semantics, this type is equivalent
143       to the Counter64 type of the SMIv2.";
144     reference
145      "RFC 2578: Structure of Management Information Version 2
146                 (SMIv2)";
147   }
148
149   typedef zero-based-counter64 {
150     type yang:counter64;
151     default "0";
152     description
153      "The zero-based-counter64 type represents a counter64 that
154       has the defined ''''initial'''' value zero.
155
156
157
158
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.
163
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.
170
171       In the value set and its semantics, this type is equivalent
172       to the ZeroBasedCounter64 textual convention of the SMIv2.";
173     reference
174      "RFC 2856: Textual Conventions for Additional High Capacity
175                 Data Types";
176   }
177
178   typedef gauge32 {
179     type uint32;
180     description
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).
193
194       In the value set and its semantics, this type is equivalent
195       to the Gauge32 type of the SMIv2.";
196     reference
197      "RFC 2578: Structure of Management Information Version 2
198                 (SMIv2)";
199   }
200
201   typedef gauge64 {
202     type uint64;
203     description
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).
216
217       In the value set and its semantics, this type is equivalent
218       to the CounterBasedGauge64 SMIv2 textual convention defined
219       in RFC 2856";
220     reference
221      "RFC 2856: Textual Conventions for Additional High Capacity
222                 Data Types";
223   }
224
225   /*** collection of identifier-related types ***/
226
227   typedef object-identifier {
228     type string {
229       pattern ''''(([0-1](.[1-3]?[0-9]))|(2.(0|([1-9]d*))))''''
230             + ''''(.(0|([1-9]d*)))*'''';
231     }
232     description
233      "The object-identifier type represents administratively
234       assigned names in a registration-hierarchical-name tree.
235
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
240       whitespace.
241
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.
249
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
253       sub-identifiers.
254
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
259       used instead.";
260     reference
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";
265   }
266
267   typedef object-identifier-128 {
268     type object-identifier {
269       pattern ''''d*(.d*){1,127}'''';
270     }
271     description
272      "This type represents object-identifiers restricted to 128
273       sub-identifiers.
274
275       In the value set and its semantics, this type is equivalent
276       to the OBJECT IDENTIFIER type of the SMIv2.";
277     reference
278      "RFC 2578: Structure of Management Information Version 2
279                 (SMIv2)";
280   }
281
282   typedef yang-identifier {
283     type string {
284       length "1..max";
285       pattern ''''[a-zA-Z_][a-zA-Z0-9-_.]*'''';
286       pattern ''''.|..|[^xX].*|.[^mM].*|..[^lL].*'''';
287     }
288     description
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.
294
295        A YANG identifier MUST NOT start with any possible
296        combination of the lowercase or uppercase character
297        sequence ''''xml''''.";
298     reference
299       "RFC 6020: YANG - A Data Modeling Language for the Network
300                  Configuration Protocol (NETCONF)";
301   }
302
303   /*** collection of types related to date and time***/
304
305   typedef date-and-time {
306     type string {
307       pattern ''''d{4}-d{2}-d{2}Td{2}:d{2}:d{2}(.d+)?''''
308             + ''''(Z|[+-]d{2}:d{2})'''';
309     }
310     description
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.
315
316       The date-and-time type is compatible with the dateTime XML
317       schema type with the following notable exceptions:
318
319       (a) The date-and-time type does not allow negative years.
320
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.
324
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''''.
329
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.
334
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
344       -00:00.";
345     reference
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";
349   }
350
351   typedef timeticks {
352     type uint32;
353     description
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.
359
360       In the value set and its semantics, this type is equivalent
361       to the TimeTicks type of the SMIv2.";
362     reference
363      "RFC 2578: Structure of Management Information Version 2
364                 (SMIv2)";
365   }
366
367   typedef timestamp {
368     type yang:timeticks;
369     description
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.
379
380       The associated timeticks schema node must be specified
381       in the description of any schema node using this type.
382
383       In the value set and its semantics, this type is equivalent
384       to the TimeStamp textual convention of the SMIv2.";
385     reference
386      "RFC 2579: Textual Conventions for SMIv2";
387   }
388
389   /*** collection of generic address types ***/
390
391   typedef phys-address {
392     type string {
393       pattern ''''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'''';
394     }
395
396
397
398
399     description
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.
404
405       In the value set and its semantics, this type is equivalent
406       to the PhysAddress textual convention of the SMIv2.";
407     reference
408      "RFC 2579: Textual Conventions for SMIv2";
409   }
410
411   typedef mac-address {
412     type string {
413       pattern ''''[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'''';
414     }
415     description
416      "The mac-address type represents an IEEE 802 MAC address.
417       The canonical representation uses lowercase characters.
418
419       In the value set and its semantics, this type is equivalent
420       to the MacAddress textual convention of the SMIv2.";
421     reference
422      "IEEE 802: IEEE Standard for Local and Metropolitan Area
423                 Networks: Overview and Architecture
424       RFC 2579: Textual Conventions for SMIv2";
425   }
426
427   /*** collection of XML-specific types ***/
428
429   typedef xpath1.0 {
430     type string;
431     description
432      "This type represents an XPATH 1.0 expression.
433
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.";
437     reference
438      "XPATH: XML Path Language (XPath) Version 1.0";
439   }
440
441   /*** collection of string types ***/
442
443   typedef hex-string {
444     type string {
445       pattern ''''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'''';
446     }
447     description
448      "A hexadecimal string with octets represented as hex digits
449       separated by colons.  The canonical representation uses
450       lowercase characters.";
451   }
452
453   typedef uuid {
454     type string {
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}'''';
457     }
458     description
459      "A Universally Unique IDentifier in the string representation
460       defined in RFC 4122.  The canonical representation uses
461       lowercase characters.
462
463       The following is an example of a UUID in string representation:
464       f81d4fae-7dec-11d0-a765-00a0c91e6bf6
465       ";
466     reference
467      "RFC 4122: A Universally Unique IDentifier (UUID) URN
468                 Namespace";
469   }
470
471   typedef dotted-quad {
472     type string {
473       pattern
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])'''';
476     }
477     description
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.";
481   }
482 }'
483 where name = 'ietf-yang-types.yang'
484 and checksum = '0c68c544f846c01751c71317339d02a504519ab05e45f50653605562df64295f';