X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator%2Fsrc%2Ftest%2Fresources%2Fietf-inet-types.yang;fp=opendaylight%2Fconfig%2Fyang-jmx-generator%2Fsrc%2Ftest%2Fresources%2Fietf-inet-types.yang;h=5c6f139a2704a5d2649126d607f1779446e0457c;hb=1f2e16571a15e763aa5c1abb5240fe6049956fe1;hp=c3ada6c68865c19f45d98b912512cc1110b2f939;hpb=23472d531aca7f695082a3d57719894bfa34d0ac;p=controller.git
diff --git a/opendaylight/config/yang-jmx-generator/src/test/resources/ietf-inet-types.yang b/opendaylight/config/yang-jmx-generator/src/test/resources/ietf-inet-types.yang
index c3ada6c688..5c6f139a27 100644
--- a/opendaylight/config/yang-jmx-generator/src/test/resources/ietf-inet-types.yang
+++ b/opendaylight/config/yang-jmx-generator/src/test/resources/ietf-inet-types.yang
@@ -10,12 +10,12 @@ module ietf-inet-types {
"WG Web:
WG List:
- WG Chair: David Partain
-
-
WG Chair: David Kessens
+ WG Chair: Juergen Schoenwaelder
+
+
Editor: Juergen Schoenwaelder
";
@@ -23,18 +23,29 @@ module ietf-inet-types {
"This module contains a collection of generally useful derived
YANG data types for Internet addresses and related things.
- Copyright (c) 2010 IETF Trust and the persons identified as
+ Copyright (c) 2013 IETF Trust and the persons identified as
authors of the code. All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, is permitted pursuant to, and subject to the license
- terms contained in, the Simplified BSD License set forth in Section
- 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject
+ to the license terms contained in, the Simplified BSD License
+ set forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
(http://trustee.ietf.org/license-info).
- This version of this YANG module is part of RFC 6021; see
+ This version of this YANG module is part of RFC 6991; see
the RFC itself for full legal notices.";
+ revision 2013-07-15 {
+ description
+ "This revision adds the following new data types:
+ - ip-address-no-zone
+ - ipv4-address-no-zone
+ - ipv6-address-no-zone";
+ reference
+ "RFC 6991: Common YANG Data Types";
+ }
+
revision 2010-09-24 {
description
"Initial revision.";
@@ -42,14 +53,15 @@ module ietf-inet-types {
"RFC 6021: Common YANG Data Types";
}
- /*** collection of protocol field related types ***/
+ /*** collection of types related to protocol fields ***/
typedef ip-version {
type enumeration {
enum unknown {
value "0";
description
- "An unknown or unspecified version of the Internet protocol.";
+ "An unknown or unspecified version of the Internet
+ protocol.";
}
enum ipv4 {
value "1";
@@ -78,9 +90,8 @@ module ietf-inet-types {
range "0..63";
}
description
- "The dscp type represents a Differentiated Services Code-Point
+ "The dscp type represents a Differentiated Services Code Point
that may be used for marking packets in a traffic stream.
-
In the value set and its semantics, this type is equivalent
to the Dscp textual convention of the SMIv2.";
reference
@@ -97,9 +108,9 @@ module ietf-inet-types {
range "0..1048575";
}
description
- "The flow-label type represents flow identifier or Flow Label
- in an IPv6 packet header that may be used to discriminate
- traffic flows.
+ "The ipv6-flow-label type represents the flow identifier or Flow
+ Label in an IPv6 packet header that may be used to
+ discriminate traffic flows.
In the value set and its semantics, this type is equivalent
to the IPv6FlowLabel textual convention of the SMIv2.";
@@ -114,14 +125,13 @@ module ietf-inet-types {
}
description
"The port-number type represents a 16-bit port number of an
- Internet transport layer protocol such as UDP, TCP, DCCP, or
+ Internet transport-layer protocol such as UDP, TCP, DCCP, or
SCTP. Port numbers are assigned by IANA. A current list of
all assignments is available from .
Note that the port number value zero is reserved by IANA. In
situations where the value zero does not make sense, it can
be excluded by subtyping the port-number type.
-
In the value set and its semantics, this type is equivalent
to the InetPortNumber textual convention of the SMIv2.";
reference
@@ -132,7 +142,7 @@ module ietf-inet-types {
RFC 4001: Textual Conventions for Internet Network Addresses";
}
- /*** collection of autonomous system related types ***/
+ /*** collection of types related to autonomous systems ***/
typedef as-number {
type uint32;
@@ -142,7 +152,7 @@ module ietf-inet-types {
of routers under a single technical administration, using
an interior gateway protocol and common metrics to route
packets within the AS, and using an exterior gateway
- protocol to route packets to other ASs'. IANA maintains
+ protocol to route packets to other ASes. IANA maintains
the AS number space and has delegated large parts to the
regional registries.
@@ -159,11 +169,12 @@ module ietf-inet-types {
"RFC 1930: Guidelines for creation, selection, and registration
of an Autonomous System (AS)
RFC 4271: A Border Gateway Protocol 4 (BGP-4)
- RFC 4893: BGP Support for Four-octet AS Number Space
- RFC 4001: Textual Conventions for Internet Network Addresses";
+ RFC 4001: Textual Conventions for Internet Network Addresses
+ RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
+ Number Space";
}
- /*** collection of IP address and hostname related types ***/
+ /*** collection of types related to IP addresses and hostnames ***/
typedef ip-address {
type union {
@@ -172,8 +183,11 @@ module ietf-inet-types {
}
description
"The ip-address type represents an IP address and is IP
- version neutral. The format of the textual representations
- implies the IP version.";
+ version neutral. The format of the textual representation
+ implies the IP version. This type supports scoped addresses
+ by allowing zone identifiers in the address format.";
+ reference
+ "RFC 4007: IPv6 Scoped Address Architecture";
}
typedef ipv4-address {
@@ -220,21 +234,55 @@ module ietf-inet-types {
interface. If the zone index is not present, the default
zone of the device will be used.
- The canonical format of IPv6 addresses uses the compressed
- format described in RFC 4291, Section 2.2, item 2 with the
- following additional rules: the :: substitution must be
- applied to the longest sequence of all-zero 16-bit chunks
- in an IPv6 address. If there is a tie, the first sequence
- of all-zero 16-bit chunks is replaced by ::. Single
- all-zero 16-bit chunks are not compressed. The canonical
- format uses lowercase characters and leading zeros are
- not allowed. The canonical format for the zone index is
- the numerical format as described in RFC 4007, Section
- 11.2.";
+ The canonical format of IPv6 addresses uses the textual
+ representation defined in Section 4 of RFC 5952. The
+ canonical format for the zone index is the numerical
+ format as described in Section 11.2 of RFC 4007.";
+ reference
+ "RFC 4291: IP Version 6 Addressing Architecture
+ RFC 4007: IPv6 Scoped Address Architecture
+ RFC 5952: A Recommendation for IPv6 Address Text
+ Representation";
+ }
+
+ typedef ip-address-no-zone {
+ type union {
+ type inet:ipv4-address-no-zone;
+ type inet:ipv6-address-no-zone;
+ }
+ description
+ "The ip-address-no-zone type represents an IP address and is
+ IP version neutral. The format of the textual representation
+ implies the IP version. This type does not support scoped
+ addresses since it does not allow zone identifiers in the
+ address format.";
+ reference
+ "RFC 4007: IPv6 Scoped Address Architecture";
+ }
+
+ typedef ipv4-address-no-zone {
+ type inet:ipv4-address {
+ pattern '[0-9\.]*';
+ }
+ description
+ "An IPv4 address without a zone index. This type, derived from
+ ipv4-address, may be used in situations where the zone is
+ known from the context and hence no zone index is needed.";
+ }
+
+ typedef ipv6-address-no-zone {
+ type inet:ipv6-address {
+ pattern '[0-9a-fA-F:\.]*';
+ }
+ description
+ "An IPv6 address without a zone index. This type, derived from
+ ipv6-address, may be used in situations where the zone is
+ known from the context and hence no zone index is needed.";
reference
"RFC 4291: IP Version 6 Addressing Architecture
RFC 4007: IPv6 Scoped Address Architecture
- RFC 5952: A Recommendation for IPv6 Address Text Representation";
+ RFC 5952: A Recommendation for IPv6 Address Text
+ Representation";
}
typedef ip-prefix {
@@ -283,7 +331,7 @@ module ietf-inet-types {
description
"The ipv6-prefix type represents an IPv6 address prefix.
The prefix length is given by the number following the
- slash character and must be less than or equal 128.
+ slash character and must be less than or equal to 128.
A prefix length value of n corresponds to an IP address
mask that has n contiguous 1-bits from the most
@@ -294,26 +342,21 @@ module ietf-inet-types {
The canonical format of an IPv6 prefix has all bits of
the IPv6 address set to zero that are not part of the
- IPv6 prefix. Furthermore, IPv6 address is represented
- in the compressed format described in RFC 4291, Section
- 2.2, item 2 with the following additional rules: the ::
- substitution must be applied to the longest sequence of
- all-zero 16-bit chunks in an IPv6 address. If there is
- a tie, the first sequence of all-zero 16-bit chunks is
- replaced by ::. Single all-zero 16-bit chunks are not
- compressed. The canonical format uses lowercase
- characters and leading zeros are not allowed.";
+ IPv6 prefix. Furthermore, the IPv6 address is represented
+ as defined in Section 4 of RFC 5952.";
reference
- "RFC 4291: IP Version 6 Addressing Architecture";
+ "RFC 5952: A Recommendation for IPv6 Address Text
+ Representation";
}
/*** collection of domain name and URI types ***/
typedef domain-name {
type string {
- 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]\.?)'
- + '|\.';
+ 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]\.?)'
+ + '|\.';
length "1..253";
}
description
@@ -345,13 +388,12 @@ module ietf-inet-types {
may require to query multiple DNS records (e.g., A for IPv4
and AAAA for IPv6). The order of the resolution process and
which DNS record takes precedence can either be defined
- explicitely or it may depend on the configuration of the
+ explicitly or may depend on the configuration of the
resolver.
Domain-name values use the US-ASCII encoding. Their canonical
format uses lowercase US-ASCII characters. Internationalized
- domain names MUST be encoded in punycode as described in RFC
- 3492";
+ domain names MUST be A-labels as per RFC 5890.";
reference
"RFC 952: DoD Internet Host Table Specification
RFC 1034: Domain Names - Concepts and Facilities
@@ -359,11 +401,8 @@ module ietf-inet-types {
and Support
RFC 2782: A DNS RR for specifying the location of services
(DNS SRV)
- RFC 3492: Punycode: A Bootstring encoding of Unicode for
- Internationalized Domain Names in Applications
- (IDNA)
- RFC 5891: Internationalizing Domain Names in Applications
- (IDNA): Protocol";
+ RFC 5890: Internationalized Domain Names in Applications
+ (IDNA): Definitions and Document Framework";
}
typedef host {