Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / ietf-inet-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-inet-types {
3   namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
4   prefix inet;
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 for Internet addresses and related things.
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        - ip-address-no-zone
41        - ipv4-address-no-zone
42        - ipv6-address-no-zone";
43     reference
44       "RFC 6991: Common YANG Data Types";
45   }
46   revision 2010-09-24 {
47     description
48       "Initial revision.";
49     reference
50       "RFC 6021: Common YANG Data Types";
51   }
52
53   typedef ip-version {
54     type enumeration {
55       enum "unknown" {
56         value 0;
57         description
58           "An unknown or unspecified version of the Internet
59            protocol.";
60       }
61       enum "ipv4" {
62         value 1;
63         description
64           "The IPv4 protocol as defined in RFC 791.";
65       }
66       enum "ipv6" {
67         value 2;
68         description
69           "The IPv6 protocol as defined in RFC 2460.";
70       }
71     }
72     description
73       "This value represents the version of the IP protocol.
74
75        In the value set and its semantics, this type is equivalent
76        to the InetVersion textual convention of the SMIv2.";
77     reference
78       "RFC  791: Internet Protocol
79        RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
80        RFC 4001: Textual Conventions for Internet Network Addresses";
81   }
82
83   typedef dscp {
84     type uint8 {
85       range "0..63";
86     }
87     description
88       "The dscp type represents a Differentiated Services Code Point
89        that may be used for marking packets in a traffic stream.
90        In the value set and its semantics, this type is equivalent
91        to the Dscp textual convention of the SMIv2.";
92     reference
93       "RFC 3289: Management Information Base for the Differentiated
94                  Services Architecture
95        RFC 2474: Definition of the Differentiated Services Field
96                  (DS Field) in the IPv4 and IPv6 Headers
97        RFC 2780: IANA Allocation Guidelines For Values In
98                  the Internet Protocol and Related Headers";
99   }
100
101   typedef ipv6-flow-label {
102     type uint32 {
103       range "0..1048575";
104     }
105     description
106       "The ipv6-flow-label type represents the flow identifier or Flow
107        Label in an IPv6 packet header that may be used to
108        discriminate traffic flows.
109
110        In the value set and its semantics, this type is equivalent
111        to the IPv6FlowLabel textual convention of the SMIv2.";
112     reference
113       "RFC 3595: Textual Conventions for IPv6 Flow Label
114        RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
115   }
116
117   typedef port-number {
118     type uint16 {
119       range "0..65535";
120     }
121     description
122       "The port-number type represents a 16-bit port number of an
123        Internet transport-layer protocol such as UDP, TCP, DCCP, or
124        SCTP.  Port numbers are assigned by IANA.  A current list of
125        all assignments is available from &lt;http://www.iana.org/&gt;.
126
127        Note that the port number value zero is reserved by IANA.  In
128        situations where the value zero does not make sense, it can
129        be excluded by subtyping the port-number type.
130        In the value set and its semantics, this type is equivalent
131        to the InetPortNumber textual convention of the SMIv2.";
132     reference
133       "RFC  768: User Datagram Protocol
134        RFC  793: Transmission Control Protocol
135        RFC 4960: Stream Control Transmission Protocol
136        RFC 4340: Datagram Congestion Control Protocol (DCCP)
137        RFC 4001: Textual Conventions for Internet Network Addresses";
138   }
139
140   typedef as-number {
141     type uint32;
142     description
143       "The as-number type represents autonomous system numbers
144        which identify an Autonomous System (AS).  An AS is a set
145        of routers under a single technical administration, using
146        an interior gateway protocol and common metrics to route
147        packets within the AS, and using an exterior gateway
148        protocol to route packets to other ASes.  IANA maintains
149        the AS number space and has delegated large parts to the
150        regional registries.
151
152        Autonomous system numbers were originally limited to 16
153        bits.  BGP extensions have enlarged the autonomous system
154        number space to 32 bits.  This type therefore uses an uint32
155        base type without a range restriction in order to support
156        a larger autonomous system number space.
157
158        In the value set and its semantics, this type is equivalent
159        to the InetAutonomousSystemNumber textual convention of
160        the SMIv2.";
161     reference
162       "RFC 1930: Guidelines for creation, selection, and registration
163                  of an Autonomous System (AS)
164        RFC 4271: A Border Gateway Protocol 4 (BGP-4)
165        RFC 4001: Textual Conventions for Internet Network Addresses
166        RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
167                  Number Space";
168   }
169
170   typedef ip-address {
171     type union {
172       type inet:ipv4-address;
173       type inet:ipv6-address;
174     }
175     description
176       "The ip-address type represents an IP address and is IP
177        version neutral.  The format of the textual representation
178        implies the IP version.  This type supports scoped addresses
179        by allowing zone identifiers in the address format.";
180     reference
181       "RFC 4007: IPv6 Scoped Address Architecture";
182   }
183
184   typedef ipv4-address {
185     type string {
186       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])(%[\\p{N}\\p{L}]+)?";
187     }
188     description
189       "The ipv4-address type represents an IPv4 address in
190        dotted-quad notation.  The IPv4 address may include a zone
191        index, separated by a % sign.
192
193        The zone index is used to disambiguate identical address
194        values.  For link-local addresses, the zone index will
195        typically be the interface index number or the name of an
196        interface.  If the zone index is not present, the default
197        zone of the device will be used.
198
199        The canonical format for the zone index is the numerical
200        format";
201   }
202
203   typedef ipv6-address {
204     type string {
205       pattern "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?";
206       pattern "(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(%.+)?";
207     }
208     description
209       "The ipv6-address type represents an IPv6 address in full,
210        mixed, shortened, and shortened-mixed notation.  The IPv6
211        address may include a zone index, separated by a % sign.
212
213        The zone index is used to disambiguate identical address
214        values.  For link-local addresses, the zone index will
215        typically be the interface index number or the name of an
216        interface.  If the zone index is not present, the default
217        zone of the device will be used.
218
219        The canonical format of IPv6 addresses uses the textual
220        representation defined in Section 4 of RFC 5952.  The
221        canonical format for the zone index is the numerical
222        format as described in Section 11.2 of RFC 4007.";
223     reference
224       "RFC 4291: IP Version 6 Addressing Architecture
225        RFC 4007: IPv6 Scoped Address Architecture
226        RFC 5952: A Recommendation for IPv6 Address Text
227                  Representation";
228   }
229
230   typedef ip-address-no-zone {
231     type union {
232       type inet:ipv4-address-no-zone;
233       type inet:ipv6-address-no-zone;
234     }
235     description
236       "The ip-address-no-zone type represents an IP address and is
237        IP version neutral.  The format of the textual representation
238        implies the IP version.  This type does not support scoped
239        addresses since it does not allow zone identifiers in the
240        address format.";
241     reference
242       "RFC 4007: IPv6 Scoped Address Architecture";
243   }
244
245   typedef ipv4-address-no-zone {
246     type inet:ipv4-address {
247       pattern "[0-9\\.]*";
248     }
249     description
250       "An IPv4 address without a zone index.  This type, derived from
251        ipv4-address, may be used in situations where the zone is
252        known from the context and hence no zone index is needed.";
253   }
254
255   typedef ipv6-address-no-zone {
256     type inet:ipv6-address {
257       pattern "[0-9a-fA-F:\\.]*";
258     }
259     description
260       "An IPv6 address without a zone index.  This type, derived from
261        ipv6-address, may be used in situations where the zone is
262        known from the context and hence no zone index is needed.";
263     reference
264       "RFC 4291: IP Version 6 Addressing Architecture
265        RFC 4007: IPv6 Scoped Address Architecture
266        RFC 5952: A Recommendation for IPv6 Address Text
267                  Representation";
268   }
269
270   typedef ip-prefix {
271     type union {
272       type inet:ipv4-prefix;
273       type inet:ipv6-prefix;
274     }
275     description
276       "The ip-prefix type represents an IP prefix and is IP
277        version neutral.  The format of the textual representations
278        implies the IP version.";
279   }
280
281   typedef ipv4-prefix {
282     type string {
283       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])/(([0-9])|([1-2][0-9])|(3[0-2]))";
284     }
285     description
286       "The ipv4-prefix type represents an IPv4 address prefix.
287        The prefix length is given by the number following the
288        slash character and must be less than or equal to 32.
289
290        A prefix length value of n corresponds to an IP address
291        mask that has n contiguous 1-bits from the most
292        significant bit (MSB) and all other bits set to 0.
293
294        The canonical format of an IPv4 prefix has all bits of
295        the IPv4 address set to zero that are not part of the
296        IPv4 prefix.";
297   }
298
299   typedef ipv6-prefix {
300     type string {
301       pattern "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))";
302       pattern "(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(/.+)";
303     }
304     description
305       "The ipv6-prefix type represents an IPv6 address prefix.
306        The prefix length is given by the number following the
307        slash character and must be less than or equal to 128.
308
309        A prefix length value of n corresponds to an IP address
310        mask that has n contiguous 1-bits from the most
311        significant bit (MSB) and all other bits set to 0.
312
313        The IPv6 address should have all bits that do not belong
314        to the prefix set to zero.
315
316        The canonical format of an IPv6 prefix has all bits of
317        the IPv6 address set to zero that are not part of the
318        IPv6 prefix.  Furthermore, the IPv6 address is represented
319        as defined in Section 4 of RFC 5952.";
320     reference
321       "RFC 5952: A Recommendation for IPv6 Address Text
322                  Representation";
323   }
324
325   typedef domain-name {
326     type string {
327       length "1..253";
328       pattern "((([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.)*([a-zA-Z0-9_]([a-zA-Z0-9\\-_]){0,61})?[a-zA-Z0-9]\\.?)|\\.";
329     }
330     description
331       "The domain-name type represents a DNS domain name.  The
332        name SHOULD be fully qualified whenever possible.
333
334        Internet domain names are only loosely specified.  Section
335        3.5 of RFC 1034 recommends a syntax (modified in Section
336        2.1 of RFC 1123).  The pattern above is intended to allow
337        for current practice in domain name use, and some possible
338        future expansion.  It is designed to hold various types of
339        domain names, including names used for A or AAAA records
340        (host names) and other records, such as SRV records.  Note
341        that Internet host names have a stricter syntax (described
342        in RFC 952) than the DNS recommendations in RFCs 1034 and
343        1123, and that systems that want to store host names in
344        schema nodes using the domain-name type are recommended to
345        adhere to this stricter standard to ensure interoperability.
346
347        The encoding of DNS names in the DNS protocol is limited
348        to 255 characters.  Since the encoding consists of labels
349        prefixed by a length bytes and there is a trailing NULL
350        byte, only 253 characters can appear in the textual dotted
351        notation.
352
353        The description clause of schema nodes using the domain-name
354        type MUST describe when and how these names are resolved to
355        IP addresses.  Note that the resolution of a domain-name value
356        may require to query multiple DNS records (e.g., A for IPv4
357        and AAAA for IPv6).  The order of the resolution process and
358        which DNS record takes precedence can either be defined
359        explicitly or may depend on the configuration of the
360        resolver.
361
362        Domain-name values use the US-ASCII encoding.  Their canonical
363        format uses lowercase US-ASCII characters.  Internationalized
364        domain names MUST be A-labels as per RFC 5890.";
365     reference
366       "RFC  952: DoD Internet Host Table Specification
367        RFC 1034: Domain Names - Concepts and Facilities
368        RFC 1123: Requirements for Internet Hosts -- Application
369                  and Support
370        RFC 2782: A DNS RR for specifying the location of services
371                  (DNS SRV)
372        RFC 5890: Internationalized Domain Names in Applications
373                  (IDNA): Definitions and Document Framework";
374   }
375
376   typedef host {
377     type union {
378       type inet:ip-address;
379       type inet:domain-name;
380     }
381     description
382       "The host type represents either an IP address or a DNS
383        domain name.";
384   }
385
386   typedef uri {
387     type string;
388     description
389       "The uri type represents a Uniform Resource Identifier
390        (URI) as defined by STD 66.
391
392        Objects using the uri type MUST be in US-ASCII encoding,
393        and MUST be normalized as described by RFC 3986 Sections
394        6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
395        percent-encoding is removed, and all case-insensitive
396        characters are set to lowercase except for hexadecimal
397        digits, which are normalized to uppercase as described in
398        Section 6.2.2.1.
399
400        The purpose of this normalization is to help provide
401        unique URIs.  Note that this normalization is not
402        sufficient to provide uniqueness.  Two URIs that are
403        textually distinct after this normalization may still be
404        equivalent.
405
406        Objects using the uri type may restrict the schemes that
407        they permit.  For example, 'data:' and 'urn:' schemes
408        might not be appropriate.
409
410        A zero-length URI is not a valid URI.  This can be used to
411        express 'URI absent' where required.
412
413        In the value set and its semantics, this type is equivalent
414        to the Uri SMIv2 textual convention defined in RFC 5017.";
415     reference
416       "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
417        RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
418                  Group: Uniform Resource Identifiers (URIs), URLs,
419                  and Uniform Resource Names (URNs): Clarifications
420                  and Recommendations
421        RFC 5017: MIB Textual Conventions for Uniform Resource
422                  Identifiers (URIs)";
423   }
424 }
425 </data>
426 </rpc-reply>