< draft-ietf-netmod-rfc6991-bis-12.txt   draft-ietf-netmod-rfc6991-bis-13.txt >
Network Working Group J. Schoenwaelder, Ed. Network Working Group J. Schoenwaelder, Ed.
Internet-Draft Jacobs University Internet-Draft Jacobs University
Obsoletes: 6991 (if approved) March 7, 2022 Obsoletes: 6991 (if approved) March 22, 2022
Intended status: Standards Track Intended status: Standards Track
Expires: September 8, 2022 Expires: September 23, 2022
Common YANG Data Types Common YANG Data Types
draft-ietf-netmod-rfc6991-bis-12 draft-ietf-netmod-rfc6991-bis-13
Abstract Abstract
This document defines a collection of common data types to be used This document defines a collection of common data types to be used
with the YANG data modeling language. This document obsoletes RFC with the YANG data modeling language. This document obsoletes RFC
6991. 6991.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 1, line 33 skipping to change at page 1, line 33
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
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."
This Internet-Draft will expire on September 8, 2022. This Internet-Draft will expire on September 23, 2022.
Copyright Notice Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the Copyright (c) 2022 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 Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 23 skipping to change at page 2, line 23
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Core YANG Derived Types . . . . . . . . . . . . . . . . . . . 6 3. Core YANG Derived Types . . . . . . . . . . . . . . . . . . . 6
4. Internet-Specific Derived Types . . . . . . . . . . . . . . . 21 4. Internet-Specific Derived Types . . . . . . . . . . . . . . . 21
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35
6. Security Considerations . . . . . . . . . . . . . . . . . . . 35 6. Security Considerations . . . . . . . . . . . . . . . . . . . 35
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 35 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 36
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.1. Normative References . . . . . . . . . . . . . . . . . . 36 8.1. Normative References . . . . . . . . . . . . . . . . . . 36
8.2. Informative References . . . . . . . . . . . . . . . . . 37 8.2. Informative References . . . . . . . . . . . . . . . . . 37
Appendix A. Changes from RFC 6991 . . . . . . . . . . . . . . . 40 Appendix A. Changes from RFC 6991 . . . . . . . . . . . . . . . 41
Appendix B. Changes from RFC 6021 . . . . . . . . . . . . . . . 41 Appendix B. Changes from RFC 6021 . . . . . . . . . . . . . . . 41
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 41 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 41
1. Introduction 1. Introduction
YANG [RFC7950] is a data modeling language used to model YANG [RFC7950] is a data modeling language used to model
configuration and state data manipulated by the Network Configuration configuration and state data manipulated by the Network Configuration
Protocol (NETCONF) [RFC6241]. The YANG language supports a small set Protocol (NETCONF) [RFC6241]. The YANG language supports a small set
of built-in data types and provides mechanisms to derive other types of built-in data types and provides mechanisms to derive other types
from the built-in types. from the built-in types.
skipping to change at page 4, line 18 skipping to change at page 4, line 18
| counter32 | uint32 | RFC 6021 | | counter32 | uint32 | RFC 6021 |
| zero-based-counter32 | uint32 | RFC 6021 | | zero-based-counter32 | uint32 | RFC 6021 |
| counter64 | uint64 | RFC 6021 | | counter64 | uint64 | RFC 6021 |
| zero-based-counter64 | uint64 | RFC 6021 | | zero-based-counter64 | uint64 | RFC 6021 |
| gauge32 | uint32 | RFC 6021 | | gauge32 | uint32 | RFC 6021 |
| gauge64 | uint64 | RFC 6021 | | gauge64 | uint64 | RFC 6021 |
| object-identifier | string | RFC 6021 | | object-identifier | string | RFC 6021 |
| object-identifier-128 | object-identifier | RFC 6021 | | object-identifier-128 | object-identifier | RFC 6021 |
| date-and-time | string | RFC 6021 | | date-and-time | string | RFC 6021 |
| date | string | RFC XXXX | | date | string | RFC XXXX |
| date-no-zone | string | RFC XXXX |
| time | string | RFC XXXX | | time | string | RFC XXXX |
| time-no-zone | string | RFC XXXX |
| hours32 | int32 | RFC XXXX | | hours32 | int32 | RFC XXXX |
| minutes32 | int32 | RFC XXXX | | minutes32 | int32 | RFC XXXX |
| seconds32 | int32 | RFC XXXX | | seconds32 | int32 | RFC XXXX |
| centiseconds32 | int32 | RFC XXXX | | centiseconds32 | int32 | RFC XXXX |
| milliseconds32 | int32 | RFC XXXX | | milliseconds32 | int32 | RFC XXXX |
| microseconds32 | int32 | RFC XXXX | | microseconds32 | int32 | RFC XXXX |
| microseconds64 | int64 | RFC XXXX | | microseconds64 | int64 | RFC XXXX |
| nanoseconds32 | int32 | RFC XXXX | | nanoseconds32 | int32 | RFC XXXX |
| nanoseconds64 | int64 | RFC XXXX | | nanoseconds64 | int64 | RFC XXXX |
| timeticks | int32 | RFC 6021 | | timeticks | int32 | RFC 6021 |
skipping to change at page 6, line 43 skipping to change at page 6, line 43
+-----------------+-----------------------------------------------+ +-----------------+-----------------------------------------------+
Table 4: Equivalent SMIv2 types for ietf-inet-types Table 4: Equivalent SMIv2 types for ietf-inet-types
3. Core YANG Derived Types 3. Core YANG Derived Types
The ietf-yang-types YANG module references [IEEE802], [ISO9834-1], The ietf-yang-types YANG module references [IEEE802], [ISO9834-1],
[RFC2578], [RFC2579], [RFC2856], [RFC3339], [RFC4122], [RFC4502], [RFC2578], [RFC2579], [RFC2856], [RFC3339], [RFC4122], [RFC4502],
[RFC7950], [RFC8294], [XPATH], and [XSD-TYPES]. [RFC7950], [RFC8294], [XPATH], and [XSD-TYPES].
<CODE BEGINS> file "ietf-yang-types@2022-03-06.yang" <CODE BEGINS> file "ietf-yang-types@2022-03-22.yang"
module ietf-yang-types { module ietf-yang-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
prefix "yang"; prefix "yang";
organization organization
"IETF Network Modeling (NETMOD) Working Group"; "IETF Network Modeling (NETMOD) Working Group";
contact contact
skipping to change at page 7, line 35 skipping to change at page 7, line 35
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
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
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; This version of this YANG module is part of RFC XXXX;
see the RFC itself for full legal notices."; see the RFC itself for full legal notices.";
revision 2022-03-06 { revision 2022-03-22 {
description description
"This revision adds the following new data types: "This revision adds the following new data types:
- date, time - date, date-no-zone, time, time-no-zone,
- hours32, minutes32, seconds32, centiseconds32, milliseconds32, - hours32, minutes32, seconds32, centiseconds32, milliseconds32,
- microseconds32, microseconds64, nanoseconds32, nanoseconds64 - microseconds32, microseconds64, nanoseconds32, nanoseconds64
The yang-identifier definition has been aligned with YANG 1.1."; The yang-identifier definition has been aligned with YANG 1.1.";
reference reference
"RFC XXXX: Common YANG Data Types"; "RFC XXXX: Common YANG Data Types";
} }
revision 2013-07-15 { revision 2013-07-15 {
description description
"This revision adds the following new data types: "This revision adds the following new data types:
skipping to change at page 14, line 32 skipping to change at page 14, line 32
(DST) time zone offset changes. The canonical format for (DST) time zone offset changes. The canonical format for
date values with an unknown time zone (usually referring date values with an unknown time zone (usually referring
to the notion of local time) uses the time-offset -00:00, to the notion of local time) uses the time-offset -00:00,
i.e., date values must be reported in UTC."; i.e., date values must be reported in UTC.";
reference reference
"RFC 3339: Date and Time on the Internet: Timestamps "RFC 3339: Date and Time on the Internet: Timestamps
XSD-TYPES: XML Schema Definition Language (XSD) 1.1 XSD-TYPES: XML Schema Definition Language (XSD) 1.1
Part 2: Datatypes"; Part 2: Datatypes";
} }
typedef date-no-zone {
type date {
pattern '[0-9]{4}-(1[0-2]|0[1-9])-(0[1-9]|[1-2][0-9]|3[0-1])';
}
description
"The date-no-zone type represents a date without the optional
time zone offset information.";
}
typedef time { typedef time {
type string { type string {
pattern '(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?' pattern '(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?'
+ '(Z|[\+\-]((1[0-3]|0[0-9]):([0-5][0-9])|14:00))?'; + '(Z|[\+\-]((1[0-3]|0[0-9]):([0-5][0-9])|14:00))?';
} }
description description
"The time type represents an instance of time of zero-duration "The time type represents an instance of time of zero-duration
that recurs every day. that recurs every day.
The time type is compatible with the XML schema time The time type is compatible with the XML schema time
skipping to change at page 15, line 17 skipping to change at page 15, line 27
(DST) time zone offset changes. The canonical format for (DST) time zone offset changes. The canonical format for
time values with an unknown time zone (usually referring time values with an unknown time zone (usually referring
to the notion of local time) uses the time-offset -00:00, to the notion of local time) uses the time-offset -00:00,
i.e., time values must be reported in UTC."; i.e., time values must be reported in UTC.";
reference reference
"RFC 3339: Date and Time on the Internet: Timestamps "RFC 3339: Date and Time on the Internet: Timestamps
XSD-TYPES: XML Schema Definition Language (XSD) 1.1 XSD-TYPES: XML Schema Definition Language (XSD) 1.1
Part 2: Datatypes"; Part 2: Datatypes";
} }
typedef time-no-zone {
type time {
pattern '(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]+)?';
}
description
"The time-no-zone type represents a time without the optional
time zone offset information.";
}
typedef hours32 { typedef hours32 {
type int32; type int32;
units "hours"; units "hours";
description description
"A period of time, measured in units of hours. "A period of time, measured in units of hours.
The maximum time period that can be expressed is in the The maximum time period that can be expressed is in the
range [-89478485 days 08:00:00 to 89478485 days 07:00:00]. range [-89478485 days 08:00:00 to 89478485 days 07:00:00].
This type should be range restricted in situations This type should be range restricted in situations
skipping to change at page 21, line 24 skipping to change at page 21, line 42
4. Internet-Specific Derived Types 4. Internet-Specific Derived Types
The ietf-inet-types YANG module references [RFC0768], [RFC0791], The ietf-inet-types YANG module references [RFC0768], [RFC0791],
[RFC0793], [RFC0952], [RFC1034], [RFC1123], [RFC1930], [RFC2317], [RFC0793], [RFC0952], [RFC1034], [RFC1123], [RFC1930], [RFC2317],
[RFC2474], [RFC2780], [RFC2782], [RFC3289], [RFC3305], [RFC3595], [RFC2474], [RFC2780], [RFC2782], [RFC3289], [RFC3305], [RFC3595],
[RFC3927], [RFC3986], [RFC4001], [RFC4007], [RFC4271], [RFC4291], [RFC3927], [RFC3986], [RFC4001], [RFC4007], [RFC4271], [RFC4291],
[RFC4340], [RFC4592] [RFC4960], [RFC5017], [RFC5322], [RFC5890], [RFC4340], [RFC4592] [RFC4960], [RFC5017], [RFC5322], [RFC5890],
[RFC5952], [RFC6793], and [RFC8200]. [RFC5952], [RFC6793], and [RFC8200].
<CODE BEGINS> file "ietf-inet-types@2022-03-06.yang" <CODE BEGINS> file "ietf-inet-types@2022-03-22.yang"
module ietf-inet-types { module ietf-inet-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
prefix "inet"; prefix "inet";
organization organization
"IETF Network Modeling (NETMOD) Working Group"; "IETF Network Modeling (NETMOD) Working Group";
contact contact
skipping to change at page 22, line 16 skipping to change at page 22, line 35
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject without modification, is permitted pursuant to, and subject
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
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; This version of this YANG module is part of RFC XXXX;
see the RFC itself for full legal notices."; see the RFC itself for full legal notices.";
revision 2022-03-06 { revision 2022-03-22 {
description description
"This revision adds the following new data types: "This revision adds the following new data types:
- inet:ip-address-and-prefix - inet:ip-address-and-prefix
- inet:ipv4-address-and-prefix - inet:ipv4-address-and-prefix
- inet:ipv6-address-and-prefix - inet:ipv6-address-and-prefix
- inet:protocol-number - inet:protocol-number
- inet:host-name - inet:host-name
- inet:email-address - inet:email-address
- inet:ip-address-link-local - inet:ip-address-link-local
- inet:ipv4-address-link-local - inet:ipv4-address-link-local
skipping to change at page 33, line 4 skipping to change at page 33, line 22
(IDNA): Definitions and Document Framework"; (IDNA): Definitions and Document Framework";
} }
typedef host-name { typedef host-name {
type domain-name { type domain-name {
pattern '[a-zA-Z0-9\-\.]+'; pattern '[a-zA-Z0-9\-\.]+';
length "2..max"; length "2..max";
} }
description description
"The host-name type represents (fully qualified) host names. "The host-name type represents (fully qualified) host names.
Host names must be at least two characters long (see RFC 952) Host names must be at least two characters long (see RFC 952)
and they are restricted to labels consisting of letters, digits and they are restricted to labels consisting of letters, digits
and hyphens separated by dots (see RFC1123 and RFC 952)."; and hyphens separated by dots (see RFC1123 and RFC 952).";
reference reference
"RFC 952: DoD Internet Host Table Specification "RFC 952: DoD Internet Host Table Specification
RFC 1123: Requirements for Internet Hosts -- Application RFC 1123: Requirements for Internet Hosts -- Application
and Support"; and Support";
} }
typedef host { typedef host {
type union { type union {
type inet:ip-address; type inet:ip-address;
type inet:host-name; type inet:host-name;
} }
description description
"The host type represents either an IP address or a (fully "The host type represents either an IP address or a (fully
qualified) host name."; qualified) host name.";
} }
typedef uri { typedef uri {
type string; type string {
pattern '[a-z][a-z0-9+.-]*:.*';
}
description description
"The uri type represents a Uniform Resource Identifier "The uri type represents a Uniform Resource Identifier
(URI) as defined by STD 66. (URI) as defined by the rule 'URI' in RFC 3986.
Objects using the uri type MUST be in US-ASCII encoding, Objects using the uri type MUST be in US-ASCII encoding,
and MUST be normalized as described by RFC 3986 Sections and MUST be normalized as described by RFC 3986 Sections
6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary
percent-encoding is removed, and all case-insensitive percent-encoding is removed, and all case-insensitive
characters are set to lowercase except for hexadecimal characters are set to lowercase except for hexadecimal
digits, which are normalized to uppercase as described in digits, which are normalized to uppercase as described in
Section 6.2.2.1. Section 6.2.2.1.
The purpose of this normalization is to help provide The purpose of this normalization is to help provide
 End of changes. 19 change blocks. 
15 lines changed or deleted 36 lines changed or added

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