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