Add geoLocation to ietf-networks:node
[oam.git] / code / network-generator / network_generation / model / yang / ietf-yang-types@2023-01-23.yang
1 module ietf-yang-types {
2
3   namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
4   prefix "yang";
5
6   organization
7    "IETF Network Modeling (NETMOD) Working Group";
8
9   contact
10    "WG Web:   <https://datatracker.ietf.org/wg/netmod/>
11     WG List:  <mailto:netmod@ietf.org>
12
13     Editor:   Juergen Schoenwaelder
14               <mailto:jschoenwaelder@constructor.university>";
15
16   description
17    "This module contains a collection of generally useful derived
18     YANG data types.
19
20     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
21     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
22     'MAY', and 'OPTIONAL' in this document are to be interpreted as
23     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
24     they appear in all capitals, as shown here.
25
26     Copyright (c) 2022 IETF Trust and the persons identified as
27     authors of the code.  All rights reserved.
28
29     Redistribution and use in source and binary forms, with or
30     without modification, is permitted pursuant to, and subject
31     to the license terms contained in, the Revised BSD License
32     set forth in Section 4.c of the IETF Trust's Legal Provisions
33     Relating to IETF Documents
34     (https://trustee.ietf.org/license-info).
35
36     This version of this YANG module is part of RFC XXXX;
37     see the RFC itself for full legal notices.";
38
39   revision 2023-01-23 {
40     description
41      "This revision adds the following new data types:
42       - yang:date-with-zone-offset
43       - yang:date-no-zone
44       - yang:time-with-zone-offset
45       - yang:time-no-zone
46       - yang:hours32
47       - yang:minutes32
48       - yang:seconds32
49       - yang:centiseconds32
50       - yang:milliseconds32
51       - yang:microseconds32
52       - yang:microseconds64
53       - yang:nanoseconds32
54       - yang:nanoseconds64
55       - yang:language-tag
56       The yang-identifier definition has been aligned with YANG 1.1.
57       Several pattern statements have been improved.";
58     reference
59      "RFC XXXX: Common YANG Data Types";
60   }
61
62   revision 2013-07-15 {
63     description
64      "This revision adds the following new data types:
65       - yang:yang-identifier
66       - yang:hex-string
67       - yang:uuid
68       - yang:dotted-quad";
69     reference
70      "RFC 6991: Common YANG Data Types";
71   }
72
73   revision 2010-09-24 {
74     description
75      "Initial revision.";
76     reference
77      "RFC 6021: Common YANG Data Types";
78   }
79
80   /*** collection of counter and gauge types ***/
81
82   typedef counter32 {
83     type uint32;
84     description
85      "The counter32 type represents a non-negative integer
86       that monotonically increases until it reaches a
87       maximum value of 2^32-1 (4294967295 decimal), when it
88       wraps around and starts increasing again from zero.
89
90       Counters have no defined 'initial' value, and thus, a
91       single value of a counter has (in general) no information
92       content.  Discontinuities in the monotonically increasing
93       value normally occur at re-initialization of the
94       management system, and at other times as specified in the
95       description of a schema node using this type.  If such
96       other times can occur, for example, the instantiation of
97       a schema node of type counter32 at times other than
98       re-initialization, then a corresponding schema node
99       should be defined, with an appropriate type, to indicate
100       the last discontinuity.
101
102       The counter32 type should not be used for configuration
103       schema nodes.  A default statement SHOULD NOT be used in
104       combination with the type counter32.
105
106       In the value set and its semantics, this type is equivalent
107       to the Counter32 type of the SMIv2.";
108     reference
109      "RFC 2578: Structure of Management Information Version 2
110                 (SMIv2)";
111   }
112
113   typedef zero-based-counter32 {
114     type yang:counter32;
115     default "0";
116     description
117      "The zero-based-counter32 type represents a counter32
118       that has the defined 'initial' value zero.
119       A schema node instance of this type will be set to zero (0)
120       on creation and will thereafter increase monotonically until
121       it reaches a maximum value of 2^32-1 (4294967295 decimal),
122       when it wraps around and starts increasing again from zero.
123
124       Provided that an application discovers a new schema node
125       instance of this type within the minimum time to wrap, it
126       can use the 'initial' value as a delta.  It is important for
127       a management station to be aware of this minimum time and the
128       actual time between polls, and to discard data if the actual
129       time is too long or there is no defined minimum time.
130
131       In the value set and its semantics, this type is equivalent
132       to the ZeroBasedCounter32 textual convention of the SMIv2.";
133     reference
134       "RFC 4502: Remote Network Monitoring Management Information
135                  Base Version 2";
136   }
137
138   typedef counter64 {
139     type uint64;
140     description
141      "The counter64 type represents a non-negative integer
142       that monotonically increases until it reaches a
143       maximum value of 2^64-1 (18446744073709551615 decimal),
144       when it wraps around and starts increasing again from zero.
145
146       Counters have no defined 'initial' value, and thus, a
147       single value of a counter has (in general) no information
148       content.  Discontinuities in the monotonically increasing
149       value normally occur at re-initialization of the
150       management system, and at other times as specified in the
151       description of a schema node using this type.  If such
152       other times can occur, for example, the instantiation of
153       a schema node of type counter64 at times other than
154       re-initialization, then a corresponding schema node
155       should be defined, with an appropriate type, to indicate
156       the last discontinuity.
157
158       The counter64 type should not be used for configuration
159       schema nodes.  A default statement SHOULD NOT be used in
160       combination with the type counter64.
161
162       In the value set and its semantics, this type is equivalent
163       to the Counter64 type of the SMIv2.";
164     reference
165      "RFC 2578: Structure of Management Information Version 2
166                 (SMIv2)";
167   }
168
169   typedef zero-based-counter64 {
170     type yang:counter64;
171     default "0";
172     description
173      "The zero-based-counter64 type represents a counter64 that
174       has the defined 'initial' value zero.
175
176       A schema node instance of this type will be set to zero (0)
177       on creation and will thereafter increase monotonically until
178       it reaches a maximum value of 2^64-1 (18446744073709551615
179       decimal), when it wraps around and starts increasing again
180       from zero.
181
182       Provided that an application discovers a new schema node
183       instance of this type within the minimum time to wrap, it
184       can use the 'initial' value as a delta.  It is important for
185       a management station to be aware of this minimum time and the
186       actual time between polls, and to discard data if the actual
187       time is too long or there is no defined minimum time.
188
189       In the value set and its semantics, this type is equivalent
190       to the ZeroBasedCounter64 textual convention of the SMIv2.";
191     reference
192      "RFC 2856: Textual Conventions for Additional High Capacity
193                 Data Types";
194   }
195
196   typedef gauge32 {
197     type uint32;
198     description
199      "The gauge32 type represents a non-negative integer, which
200       may increase or decrease, but shall never exceed a maximum
201       value, nor fall below a minimum value.  The maximum value
202       cannot be greater than 2^32-1 (4294967295 decimal), and
203       the minimum value cannot be smaller than 0.  The value of
204       a gauge32 has its maximum value whenever the information
205       being modeled is greater than or equal to its maximum
206       value, and has its minimum value whenever the information
207       being modeled is smaller than or equal to its minimum value.
208       If the information being modeled subsequently decreases
209       below (increases above) the maximum (minimum) value, the
210       gauge32 also decreases (increases).
211
212       In the value set and its semantics, this type is equivalent
213       to the Gauge32 type of the SMIv2.";
214     reference
215      "RFC 2578: Structure of Management Information Version 2
216                 (SMIv2)";
217   }
218
219   typedef gauge64 {
220     type uint64;
221     description
222      "The gauge64 type represents a non-negative integer, which
223       may increase or decrease, but shall never exceed a maximum
224       value, nor fall below a minimum value.  The maximum value
225       cannot be greater than 2^64-1 (18446744073709551615), and
226       the minimum value cannot be smaller than 0.  The value of
227       a gauge64 has its maximum value whenever the information
228       being modeled is greater than or equal to its maximum
229       value, and has its minimum value whenever the information
230       being modeled is smaller than or equal to its minimum value.
231       If the information being modeled subsequently decreases
232       below (increases above) the maximum (minimum) value, the
233       gauge64 also decreases (increases).
234
235       In the value set and its semantics, this type is equivalent
236       to the CounterBasedGauge64 SMIv2 textual convention defined
237       in RFC 2856";
238     reference
239      "RFC 2856: Textual Conventions for Additional High Capacity
240                 Data Types";
241   }
242
243   /*** collection of identifier-related types ***/
244
245   typedef object-identifier {
246     type string {
247       pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9][0-9]*))))'
248             + '(\.(0|([1-9][0-9]*)))*';
249     }
250     description
251      "The object-identifier type represents administratively
252       assigned names in a registration-hierarchical-name tree.
253
254       Values of this type are denoted as a sequence of numerical
255       non-negative sub-identifier values.  Each sub-identifier
256       value MUST NOT exceed 2^32-1 (4294967295).  Sub-identifiers
257       are separated by single dots and without any intermediate
258       whitespace.
259
260       The ASN.1 standard restricts the value space of the first
261       sub-identifier to 0, 1, or 2.  Furthermore, the value space
262       of the second sub-identifier is restricted to the range
263       0 to 39 if the first sub-identifier is 0 or 1.  Finally,
264       the ASN.1 standard requires that an object identifier
265       has always at least two sub-identifiers.  The pattern
266       captures these restrictions.
267
268       Although the number of sub-identifiers is not limited,
269       module designers should realize that there may be
270       implementations that stick with the SMIv2 limit of 128
271       sub-identifiers.
272
273       This type is a superset of the SMIv2 OBJECT IDENTIFIER type
274       since it is not restricted to 128 sub-identifiers.  Hence,
275       this type SHOULD NOT be used to represent the SMIv2 OBJECT
276       IDENTIFIER type; the object-identifier-128 type SHOULD be
277       used instead.";
278     reference
279      "ISO9834-1: Information technology -- Open Systems
280       Interconnection -- Procedures for the operation of OSI
281       Registration Authorities: General procedures and top
282       arcs of the ASN.1 Object Identifier tree";
283   }
284
285   typedef object-identifier-128 {
286     type object-identifier {
287       pattern '[0-9]*(\.[0-9]*){1,127}';
288     }
289     description
290      "This type represents object-identifiers restricted to 128
291       sub-identifiers.
292
293       In the value set and its semantics, this type is equivalent
294       to the OBJECT IDENTIFIER type of the SMIv2.";
295     reference
296      "RFC 2578: Structure of Management Information Version 2
297                 (SMIv2)";
298   }
299
300   /*** collection of types related to date and time ***/
301
302   typedef date-and-time {
303     type string {
304       pattern '[0-9]{4}-(1[0-2]|0[1-9])-(0[1-9]|[1-2][0-9]|3[0-1])'
305             + 'T(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?'
306             + '(Z|[\+\-]((1[0-3]|0[0-9]):([0-5][0-9])|14:00))?';
307     }
308     description
309      "The date-and-time type is a profile of the ISO 8601
310       standard for representation of dates and times using the
311       Gregorian calendar.  The profile is defined by the
312       date-time production in Section 5.6 of RFC 3339.
313
314       The date-and-time type is compatible with the dateTime XML
315       schema dateTime type with the following notable exceptions:
316
317       (a) The date-and-time type does not allow negative years.
318
319       (b) The time-offset -00:00 indicates that the date-and-time
320           value is reported in UTC and that the local time zone
321           reference point is unknown. The time-offsets +00:00 and Z
322           both indicate that the date-and-time value is reported in
323           UTC and that the local time reference point is UTC (see RFC
324           3339 section 4.3).
325
326       This type is not equivalent to the DateAndTime textual
327       convention of the SMIv2 since RFC 3339 uses a different
328       separator between full-date and full-time and provides
329       higher resolution of time-secfrac.
330
331       The canonical format for date-and-time values with a known time
332       zone uses a numeric time zone offset that is calculated using
333       the device's configured known offset to UTC time.  A change of
334       the device's offset to UTC time will cause date-and-time values
335       to change accordingly.  Such changes might happen periodically
336       in case a server follows automatically daylight saving time
337       (DST) time zone offset changes.  The canonical format for
338       date-and-time values with an unknown time zone (usually
339       referring to the notion of local time) uses the time-offset
340       -00:00, i.e., date-and-time values must be reported in UTC.";
341     reference
342      "RFC 3339: Date and Time on the Internet: Timestamps
343       RFC 2579: Textual Conventions for SMIv2
344       XSD-TYPES: XML Schema Definition Language (XSD) 1.1
345                  Part 2: Datatypes";
346   }
347
348   typedef date-with-zone-offset {
349     type string {
350       pattern '[0-9]{4}-(1[0-2]|0[1-9])-(0[1-9]|[1-2][0-9]|3[0-1])'
351             + '(Z|[\+\-]((1[0-3]|0[0-9]):([0-5][0-9])|14:00))?';
352     }
353     description
354      "The date type represents a time-interval of the length
355       of a day, i.e., 24 hours.
356
357       The date type is compatible with the XML schema date
358       type with the following notable exceptions:
359       (a) The date type does not allow negative years.
360
361       (b) The time-offset -00:00 indicates that the date value is
362           reported in UTC and that the local time zone reference point
363           is unknown. The time-offsets +00:00 and Z both indicate that
364           the date value is reported in UTC and that the local time
365           reference point is UTC (see RFC 3339 section 4.3).
366
367       The canonical format for date values with a known time
368       zone uses a numeric time zone offset that is calculated using
369       the device's configured known offset to UTC time.  A change of
370       the device's offset to UTC time will cause date values
371       to change accordingly.  Such changes might happen periodically
372       in case a server follows automatically daylight saving time
373       (DST) time zone offset changes.  The canonical format for
374       date values with an unknown time zone (usually referring
375       to the notion of local time) uses the time-offset -00:00,
376       i.e., date values must be reported in UTC.";
377     reference
378      "RFC 3339: Date and Time on the Internet: Timestamps
379       XSD-TYPES: XML Schema Definition Language (XSD) 1.1
380                  Part 2: Datatypes";
381   }
382
383   typedef date-no-zone {
384     type date-with-zone-offset {
385       pattern '[0-9]{4}-(1[0-2]|0[1-9])-(0[1-9]|[1-2][0-9]|3[0-1])';
386     }
387     description
388      "The date-no-zone type represents a date without the optional
389       time zone offset information.";
390   }
391
392   typedef time-with-zone-offset {
393     type string {
394       pattern '(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?'
395             + '(Z|[\+\-]((1[0-3]|0[0-9]):([0-5][0-9])|14:00))?';
396     }
397     description
398      "The time type represents an instance of time of zero-duration
399       that recurs every day.
400
401       The time type is compatible with the XML schema time
402       type with the following notable exception:
403
404       (a) The time-offset -00:00 indicates that the time value is
405           reported in UTC and that the local time zone reference point
406           is unknown. The time-offsets +00:00 and Z both indicate that
407           the time value is reported in UTC and that the local time
408           reference point is UTC (see RFC 3339 section 4.3).
409
410       The canonical format for time values with a known time
411       zone uses a numeric time zone offset that is calculated using
412       the device's configured known offset to UTC time.  A change of
413       the device's offset to UTC time will cause time values
414       to change accordingly.  Such changes might happen periodically
415       in case a server follows automatically daylight saving time
416       (DST) time zone offset changes.  The canonical format for
417       time values with an unknown time zone (usually referring
418       to the notion of local time) uses the time-offset -00:00,
419       i.e., time values must be reported in UTC.";
420     reference
421      "RFC 3339: Date and Time on the Internet: Timestamps
422       XSD-TYPES: XML Schema Definition Language (XSD) 1.1
423                  Part 2: Datatypes";
424   }
425
426   typedef time-no-zone {
427     type time-with-zone-offset {
428       pattern '(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?';
429     }
430     description
431      "The time-no-zone type represents a time without the optional
432       time zone offset information.";
433   }
434
435   typedef hours32 {
436     type int32;
437     units "hours";
438     description
439      "A period of time, measured in units of hours.
440
441       The maximum time period that can be expressed is in the
442       range [-89478485 days 08:00:00 to 89478485 days 07:00:00].
443
444       This type should be range restricted in situations
445       where only non-negative time periods are desirable,
446       (i.e., range '0..max').";
447   }
448
449   typedef minutes32 {
450     type int32;
451     units "minutes";
452     description
453      "A period of time, measured in units of minutes.
454
455       The maximum time period that can be expressed is in the
456       range [-1491308 days 2:08:00 to 1491308 days 2:07:00].
457
458       This type should be range restricted in situations
459       where only non-negative time periods are desirable,
460       (i.e., range '0..max').";
461   }
462
463   typedef seconds32 {
464     type int32;
465     units "seconds";
466     description
467      "A period of time, measured in units of seconds.
468
469       The maximum time period that can be expressed is in the
470       range [-24855 days 03:14:08 to 24855 days 03:14:07].
471
472       This type should be range restricted in situations
473       where only non-negative time periods are desirable,
474       (i.e., range '0..max').";
475   }
476
477   typedef centiseconds32 {
478     type int32;
479     units "centiseconds";
480     description
481      "A period of time, measured in units of 10^-2 seconds.
482
483       The maximum time period that can be expressed is in the
484       range [-248 days 13:13:56 to 248 days 13:13:56].
485
486       This type should be range restricted in situations
487       where only non-negative time periods are desirable,
488       (i.e., range '0..max').";
489   }
490
491   typedef milliseconds32 {
492     type int32;
493     units "milliseconds";
494     description
495      "A period of time, measured in units of 10^-3 seconds.
496
497       The maximum time period that can be expressed is in the
498       range [-24 days 20:31:23 to 24 days 20:31:23].
499
500       This type should be range restricted in situations
501       where only non-negative time periods are desirable,
502       (i.e., range '0..max').";
503   }
504
505   typedef microseconds32 {
506     type int32;
507     units "microseconds";
508     description
509      "A period of time, measured in units of 10^-6 seconds.
510
511       The maximum time period that can be expressed is in the
512       range [-00:35:47 to 00:35:47].
513
514       This type should be range restricted in situations
515       where only non-negative time periods are desirable,
516       (i.e., range '0..max').";
517   }
518
519   typedef microseconds64 {
520     type int64;
521     units "microseconds";
522     description
523      "A period of time, measured in units of 10^-6 seconds.
524
525       The maximum time period that can be expressed is in the
526       range [-106751991 days 04:00:54 to 106751991 days 04:00:54].
527
528       This type should be range restricted in situations
529       where only non-negative time periods are desirable,
530       (i.e., range '0..max').";
531   }
532
533   typedef nanoseconds32 {
534     type int32;
535     units "nanoseconds";
536     description
537      "A period of time, measured in units of 10^-9 seconds.
538
539       The maximum time period that can be expressed is in the
540       range [-00:00:02 to 00:00:02].
541
542       This type should be range restricted in situations
543       where only non-negative time periods are desirable,
544       (i.e., range '0..max').";
545   }
546
547   typedef nanoseconds64 {
548     type int64;
549     units "nanoseconds";
550     description
551      "A period of time, measured in units of 10^-9 seconds.
552
553       The maximum time period that can be expressed is in the
554       range [-106753 days 23:12:44 to 106752 days 0:47:16].
555
556       This type should be range restricted in situations
557       where only non-negative time periods are desirable,
558       (i.e., range '0..max').";
559   }
560
561   typedef timeticks {
562     type uint32;
563     description
564      "The timeticks type represents a non-negative integer that
565       represents the time, modulo 2^32 (4294967296 decimal), in
566       hundredths of a second between two epochs.  When a schema
567       node is defined that uses this type, the description of
568       the schema node identifies both of the reference epochs.
569
570       In the value set and its semantics, this type is equivalent
571       to the TimeTicks type of the SMIv2.";
572     reference
573      "RFC 2578: Structure of Management Information Version 2
574                 (SMIv2)";
575   }
576
577   typedef timestamp {
578     type yang:timeticks;
579     description
580      "The timestamp type represents the value of an associated
581       timeticks schema node instance at which a specific occurrence
582       happened.  The specific occurrence must be defined in the
583       description of any schema node defined using this type.  When
584       the specific occurrence occurred prior to the last time the
585       associated timeticks schema node instance was zero, then the
586       timestamp value is zero.
587
588       Note that this requires all timestamp values to be reset to
589       zero when the value of the associated timeticks schema node
590       instance reaches 497+ days and wraps around to zero.
591
592       The associated timeticks schema node must be specified
593       in the description of any schema node using this type.
594
595       In the value set and its semantics, this type is equivalent
596       to the TimeStamp textual convention of the SMIv2.";
597     reference
598      "RFC 2579: Textual Conventions for SMIv2";
599   }
600
601   /*** collection of generic address types ***/
602
603   typedef phys-address {
604     type string {
605       pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
606     }
607     description
608      "Represents media- or physical-level addresses represented
609       as a sequence octets, each octet represented by two hexadecimal
610       numbers.  Octets are separated by colons.  The canonical
611       representation uses lowercase characters.
612
613       In the value set and its semantics, this type is equivalent
614       to the PhysAddress textual convention of the SMIv2.";
615     reference
616      "RFC 2579: Textual Conventions for SMIv2";
617   }
618
619   typedef mac-address {
620     type string {
621       pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
622     }
623     description
624      "The mac-address type represents an IEEE 802 MAC address.
625       The canonical representation uses lowercase characters.
626
627       In the value set and its semantics, this type is equivalent
628       to the MacAddress textual convention of the SMIv2.";
629     reference
630      "IEEE 802: IEEE Standard for Local and Metropolitan Area
631                 Networks: Overview and Architecture
632       RFC 2579: Textual Conventions for SMIv2";
633   }
634
635   /*** collection of XML-specific types ***/
636
637   typedef xpath1.0 {
638     type string;
639     description
640      "This type represents an XPATH 1.0 expression.
641
642       When a schema node is defined that uses this type, the
643       description of the schema node MUST specify the XPath
644       context in which the XPath expression is evaluated.";
645     reference
646      "XPATH: XML Path Language (XPath) Version 1.0";
647   }
648
649   /*** collection of string types ***/
650
651   typedef hex-string {
652     type string {
653       pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
654     }
655     description
656      "A hexadecimal string with octets represented as hex digits
657       separated by colons.  The canonical representation uses
658       lowercase characters.";
659   }
660
661   typedef uuid {
662     type string {
663       pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-'
664             + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}';
665     }
666     description
667      "A Universally Unique IDentifier in the string representation
668       defined in RFC 4122.  The canonical representation uses
669       lowercase characters.
670
671       The following is an example of a UUID in string representation:
672       f81d4fae-7dec-11d0-a765-00a0c91e6bf6
673       ";
674     reference
675      "RFC 4122: A Universally Unique IDentifier (UUID) URN
676                 Namespace";
677   }
678
679   typedef dotted-quad {
680     type string {
681       pattern
682         '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
683       + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
684     }
685     description
686       "An unsigned 32-bit number expressed in the dotted-quad
687        notation, i.e., four octets written as decimal numbers
688        and separated with the '.' (full stop) character.";
689   }
690
691   typedef language-tag {
692     type string;
693     description
694        "A language tag according to RFC 5646 (BCP 47). The
695         canonical representation uses lowercase characters.
696
697         Values of this type must be well-formed language tags,
698         in conformance with the definition of well-formed tags
699         in BCP 47. Implementations MAY further limit the values
700         they accept to those permitted by a 'validating'
701         processor, as defined in BCP 47.
702
703         The canonical representation of values of this type is
704         aligned with the SMIv2 LangTag textual convention for
705         language tags fitting the length constraints imposed
706         by the LangTag textual convention.";
707     reference
708        "RFC 5646: Tags for Identifying Languages
709         RFC 5131: A MIB Textual Convention for Language Tags";
710   }
711
712   /*** collection of YANG specific types ***/
713
714   typedef yang-identifier {
715     type string {
716       length "1..max";
717       pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*';
718     }
719     description
720       "A YANG identifier string as defined by the 'identifier'
721        rule in Section 14 of RFC 7950. An identifier must
722        start with an alphabetic character or an underscore
723        followed by an arbitrary sequence of alphabetic or
724        numeric characters, underscores, hyphens, or dots.
725
726        This definition conforms to YANG 1.1 defined in RFC
727        7950. An earlier version of this definition did exclude
728        all identifiers starting with any possible combination
729        of the lowercase or uppercase character sequence 'xml',
730        as required by YANG 1 defined in RFC 6020. If this type
731        is used in a YANG 1 context, then this restriction still
732        applies.";
733     reference
734       "RFC 7950: The YANG 1.1 Data Modeling Language
735        RFC 6020: YANG - A Data Modeling Language for the
736                  Network Configuration Protocol (NETCONF)";
737   }
738
739 }