draft-ietf-netmod-yang-types-04.txt   draft-ietf-netmod-yang-types-05.txt 
Network Working Group J. Schoenwaelder, Ed. Network Working Group J. Schoenwaelder, Ed.
Internet-Draft Jacobs University Internet-Draft Jacobs University
Intended status: Standards Track October 23, 2009 Intended status: Standards Track December 1, 2009
Expires: April 26, 2010 Expires: June 4, 2010
Common YANG Data Types Common YANG Data Types
draft-ietf-netmod-yang-types-04 draft-ietf-netmod-yang-types-05
Status of this Memo Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79. This document may contain material provisions of BCP 78 and BCP 79. This document may contain material
from IETF Documents or IETF Contributions published or made publicly from IETF Documents or IETF Contributions published or made publicly
available before November 10, 2008. The person(s) controlling the available before November 10, 2008. The person(s) controlling the
copyright in some of this material may not have granted the IETF copyright in some of this material may not have granted the IETF
Trust the right to allow modifications of such material outside the Trust the right to allow modifications of such material outside the
IETF Standards Process. Without obtaining an adequate license from IETF Standards Process. Without obtaining an adequate license from
skipping to change at page 1, line 42 skipping to change at page 1, line 42
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on April 26, 2010. This Internet-Draft will expire on June 4, 2010.
Copyright Notice Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents in effect on the date of Provisions Relating to IETF Documents in effect on the date of
publication of this document (http://trustee.ietf.org/license-info). publication of this document (http://trustee.ietf.org/license-info).
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 7, line 7 skipping to change at page 7, line 7
| ipv6-prefix | - | | ipv6-prefix | - |
| domain-name | - | | domain-name | - |
| host | - | | host | - |
| uri | Uri (URI-TC-MIB) | | uri | Uri (URI-TC-MIB) |
+-----------------+-----------------------------------------------+ +-----------------+-----------------------------------------------+
Table 2 Table 2
3. Core YANG Derived Types 3. Core YANG Derived Types
== begin "ietf-yang-types.yang" <CODE BEGINS> file "ietf-yang-types.yang"
module ietf-yang-types { module ietf-yang-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types-DRAFT-04"; namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types-DRAFT-05";
prefix "yang"; prefix "yang";
organization organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group"; "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/netmod/> "WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org> WG List: <mailto:netmod@ietf.org>
WG Chair: David Partain WG Chair: David Partain
skipping to change at page 7, line 49 skipping to change at page 7, line 49
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and remove this note // RFC Ed.: replace XXXX with actual RFC number and remove this note
// RFC Ed.: remove this note // RFC Ed.: remove this note
// Note: extracted from draft-ietf-netmod-yang-types-04.txt // Note: extracted from draft-ietf-netmod-yang-types-05.txt
revision 2009-10-23 { revision 2009-11-10 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: Common YANG Data Types"; "RFC XXXX: Common YANG Data Types";
} }
// RFC Ed.: replace XXXX with actual RFC number and remove this note // RFC Ed.: replace XXXX with actual RFC number and remove this note
/*** collection of counter and gauge types ***/ /*** collection of counter and gauge types ***/
typedef counter32 { typedef counter32 {
skipping to change at page 12, line 30 skipping to change at page 12, line 30
} }
/*** collection of date and time related types ***/ /*** collection of date and time related types ***/
typedef date-and-time { typedef date-and-time {
type string { type string {
pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'
+ '(Z|(\+|-)\d{2}:\d{2})'; + '(Z|(\+|-)\d{2}:\d{2})';
} }
description description
'The date-and-time type is a profile of the ISO 8601 "The date-and-time type is a profile of the ISO 8601
standard for representation of dates and times using the standard for representation of dates and times using the
Gregorian calendar. The format is most easily described Gregorian calendar. The format is most easily described
using the following ABFN (see RFC 3339): using the following ABFN (replacing double quotes with
single quotes):
date-fullyear = 4DIGIT date-fullyear = 4DIGIT
date-month = 2DIGIT ; 01-12 date-month = 2DIGIT ; 01-12
date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31
time-hour = 2DIGIT ; 00-23 time-hour = 2DIGIT ; 00-23
time-minute = 2DIGIT ; 00-59 time-minute = 2DIGIT ; 00-59
time-second = 2DIGIT ; 00-58, 00-59, 00-60 time-second = 2DIGIT ; 00-58, 00-59, 00-60
time-secfrac = "." 1*DIGIT time-secfrac = '.' 1*DIGIT
time-numoffset = ("+" / "-") time-hour ":" time-minute time-numoffset = ('+' / '-') time-hour ':' time-minute
time-offset = "Z" / time-numoffset time-offset = 'Z' / time-numoffset
partial-time = time-hour ":" time-minute ":" time-second partial-time = time-hour ':' time-minute ':' time-second
[time-secfrac] [time-secfrac]
full-date = date-fullyear "-" date-month "-" date-mday full-date = date-fullyear '-' date-month '-' date-mday
full-time = partial-time time-offset full-time = partial-time time-offset
date-time = full-date "T" full-time date-time = full-date 'T' full-time
The date-and-time type is consistent with the semantics defined The date-and-time type is consistent with the semantics defined
in RFC 3339. The date-and-time type is compatible with the in RFC 3339. The date-and-time type is compatible with the
dateTime XML schema type with the following two notable dateTime XML schema type with the following two notable
exceptions: exceptions:
(a) The date-and-time type does not allow negative years. (a) The date-and-time type does not allow negative years.
(b) The date-and-time time-offset -00:00 indicates an unknown (b) The date-and-time time-offset -00:00 indicates an unknown
time zone (see RFC 3339) while -00:00 and +00:00 and Z all time zone (see RFC 3339) while -00:00 and +00:00 and Z all
represent the same time zone in dateTime. represent the same time zone in dateTime.
(c) The canonical format (see below) of data-and-time values (c) The canonical format (see below) of data-and-time values
differs from the canonical format used by the dateTime XML differs from the canonical format used by the dateTime XML
schema type, which requires all times to be in UTC using the schema type, which requires all times to be in UTC using the
time-offset "Z". time-offset 'Z'.
This type is not equivalent to the DateAndTime textual This type is not equivalent to the DateAndTime textual
convention of the SMIv2 since RFC 3339 uses a different convention of the SMIv2 since RFC 3339 uses a different
separator between full-date and full-time and provides separator between full-date and full-time and provides
higher resolution of time-secfrac. higher resolution of time-secfrac.
The canonical format for date-and-time values with a known time The canonical format for date-and-time values with a known time
zone uses a numeric time zone offset that is calculated using zone uses a numeric time zone offset that is calculated using
the device's configured known offset to UTC time. A change of the device's configured known offset to UTC time. A change of
the device's offset to UTC time will cause date-and-time values the device's offset to UTC time will cause date-and-time values
to change accordingly. Such changes might happen periodically to change accordingly. Such changes might happen periodically
in case a server follows automatically daylight saving time in case a server follows automatically daylight saving time
(DST) time zone offset changes. The canonical format for (DST) time zone offset changes. The canonical format for
date-and-time values with an unknown time zone (usually refering date-and-time values with an unknown time zone (usually refering
to the notion of local time) uses the time-offset -00:00.'; to the notion of local time) uses the time-offset -00:00.";
reference reference
"RFC 3339: Date and Time on the Internet: Timestamps "RFC 3339: Date and Time on the Internet: Timestamps
RFC 2579: Textual Conventions for SMIv2 RFC 2579: Textual Conventions for SMIv2
W3C REC-xmlschema-2-20041028: XML Schema Part 2: Datatypes W3C REC-xmlschema-2-20041028: XML Schema Part 2: Datatypes
Second Edition"; Second Edition";
} }
typedef timeticks { typedef timeticks {
type uint32; type uint32;
description description
skipping to change at page 14, line 35 skipping to change at page 14, line 35
This type is in the value set and its semantics equivalent This type is in the value set and its semantics equivalent
to the TimeStamp textual convention of the SMIv2."; to the TimeStamp textual convention of the SMIv2.";
reference reference
"RFC 2579: Textual Conventions for SMIv2"; "RFC 2579: Textual Conventions for SMIv2";
} }
/*** collection of generic address types ***/ /*** collection of generic address types ***/
typedef phys-address { typedef phys-address {
type string { type string {
pattern '([0-9a0-fA-F]{2}(:[0-9a0-fA-F]{2})*)?'; pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
} }
description description
"Represents media- or physical-level addresses represented "Represents media- or physical-level addresses represented
as a sequence octets, each octet represented by two hexadecimal as a sequence octets, each octet represented by two hexadecimal
numbers. Octets are separated by colons. numbers. Octets are separated by colons. The canonical
representation uses lower-case characters.
This type is in the value set and its semantics equivalent This type is in the value set and its semantics equivalent
to the PhysAddress textual convention of the SMIv2."; to the PhysAddress textual convention of the SMIv2.";
reference reference
"RFC 2579: Textual Conventions for SMIv2"; "RFC 2579: Textual Conventions for SMIv2";
} }
typedef mac-address { typedef mac-address {
type string { type string {
pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
} }
description description
"The mac-address type represents an IEEE 802 MAC address. "The mac-address type represents an IEEE 802 MAC address.
The canonical representation uses lower-case characters.
This type is in the value set and its semantics equivalent to This type is in the value set and its semantics equivalent to
the MacAddress textual convention of the SMIv2."; the MacAddress textual convention of the SMIv2.";
reference reference
"IEEE 802: IEEE Standard for Local and Metropolitan Area "IEEE 802: IEEE Standard for Local and Metropolitan Area
Networks: Overview and Architecture Networks: Overview and Architecture
RFC 2579: Textual Conventions for SMIv2"; RFC 2579: Textual Conventions for SMIv2";
} }
/*** collection of XML specific types ***/ /*** collection of XML specific types ***/
skipping to change at page 15, line 26 skipping to change at page 15, line 28
typedef xpath1.0 { typedef xpath1.0 {
type string; type string;
description description
"This type represents an XPATH 1.0 expression."; "This type represents an XPATH 1.0 expression.";
reference reference
"W3C REC-xpath-19991116: XML Path Language (XPath) Version 1.0"; "W3C REC-xpath-19991116: XML Path Language (XPath) Version 1.0";
} }
} }
== end "ietf-yang-types.yang" <CODE ENDS>
4. Internet Specific Derived Types 4. Internet Specific Derived Types
== begin "ietf-inet-types.yang" <CODE BEGINS> file "ietf-inet-types.yang"
module ietf-inet-types { module ietf-inet-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types-DRAFT-04"; namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types-DRAFT-05";
prefix "inet"; prefix "inet";
organization organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group"; "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact contact
"WG Web: <http://tools.ietf.org/wg/netmod/> "WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org> WG List: <mailto:netmod@ietf.org>
WG Chair: David Partain WG Chair: David Partain
skipping to change at page 16, line 49 skipping to change at page 16, line 49
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and remove this note // RFC Ed.: replace XXXX with actual RFC number and remove this note
// RFC Ed.: remove this note // RFC Ed.: remove this note
// Note: extracted from draft-ietf-netmod-yang-types-04.txt // Note: extracted from draft-ietf-netmod-yang-types-05.txt
revision 2009-10-23 { revision 2009-11-10 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: Common YANG Data Types"; "RFC XXXX: Common YANG Data Types";
} }
// RFC Ed.: replace XXXX with actual RFC number and remove this note // RFC Ed.: replace XXXX with actual RFC number and remove this note
/*** collection of protocol field related types ***/ /*** collection of protocol field related types ***/
typedef ip-version { typedef ip-version {
skipping to change at page 21, line 18 skipping to change at page 21, line 18
applied to the longest sequence of all-zero 16-bit chunks applied to the longest sequence of all-zero 16-bit chunks
in an IPv6 address. If there is a tie, the first sequence in an IPv6 address. If there is a tie, the first sequence
of all-zero 16-bit chunks is replaced by ::. Single of all-zero 16-bit chunks is replaced by ::. Single
all-zero 16-bit chunks are not compressed. The normalized all-zero 16-bit chunks are not compressed. The normalized
format uses lower-case characters and leading zeros are format uses lower-case characters and leading zeros are
not allowed. The canonical format for the zone index is not allowed. The canonical format for the zone index is
the numerical format as described in RFC 4007 section the numerical format as described in RFC 4007 section
11.2."; 11.2.";
reference reference
"RFC 4291: IP Version 6 Addressing Architecture "RFC 4291: IP Version 6 Addressing Architecture
RFC 4007: IPv6 Scoped Address Architecture"; RFC 4007: IPv6 Scoped Address Architecture
IDv6TREP: A Recommendation for IPv6 Address Text Representation";
} }
typedef ip-prefix { typedef ip-prefix {
type union { type union {
type inet:ipv4-prefix; type inet:ipv4-prefix;
type inet:ipv6-prefix; type inet:ipv6-prefix;
} }
description description
"The ip-prefix type represents an IP prefix and is IP "The ip-prefix type represents an IP prefix and is IP
version neutral. The format of the textual representations version neutral. The format of the textual representations
skipping to change at page 24, line 48 skipping to change at page 24, line 49
RFC 3305: Report from the Joint W3C/IETF URI Planning Interest RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
Group: Uniform Resource Identifiers (URIs), URLs, Group: Uniform Resource Identifiers (URIs), URLs,
and Uniform Resource Names (URNs): Clarifications and Uniform Resource Names (URNs): Clarifications
and Recommendations and Recommendations
RFC 5017: MIB Textual Conventions for Uniform Resource RFC 5017: MIB Textual Conventions for Uniform Resource
Identifiers (URIs)"; Identifiers (URIs)";
} }
} }
== end "ietf-inet-types.yang" <CODE ENDS>
5. IANA Considerations 5. IANA Considerations
This document registers two URIs in the IETF XML registry [RFC3688]. This document registers two URIs in the IETF XML registry [RFC3688].
Following the format in RFC 3688, the following registration is Following the format in RFC 3688, the following registration is
requested. requested.
URI: urn:ietf:params:xml:ns:yang:ietf-yang-types URI: urn:ietf:params:xml:ns:yang:ietf-yang-types
URI: urn:ietf:params:xml:ns:yang:ietf-inet-types URI: urn:ietf:params:xml:ns:yang:ietf-inet-types
skipping to change at page 29, line 16 skipping to change at page 29, line 16
9.1. Normative References 9.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004. January 2004.
[YANG] Bjorklund, M., Ed., "YANG - A data modeling language for [YANG] Bjorklund, M., Ed., "YANG - A data modeling language for
NETCONF", draft-ietf-netmod-yang-08 (work in progress). NETCONF", draft-ietf-netmod-yang-09 (work in progress).
9.2. Informative References 9.2. Informative References
[IDv6TREP]
Kawamura, S. and M. Kawashima, "A Recommendation for IPv6
Address Text Representation",
draft-ietf-6man-text-addr-representation-03 (work in
progress).
[IEEE802] IEEE, "IEEE Standard for Local and Metropolitan Area [IEEE802] IEEE, "IEEE Standard for Local and Metropolitan Area
Networks: Overview and Architecture", IEEE Std. 802-2001. Networks: Overview and Architecture", IEEE Std. 802-2001.
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
August 1980. August 1980.
[RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791,
September 1981. September 1981.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
 End of changes. 27 change blocks. 
28 lines changed or deleted 38 lines changed or added

This html diff was produced by rfcdiff 1.37a. The latest version is available from http://tools.ietf.org/tools/rfcdiff/