draft-ietf-netmod-yang-data-ext-00.txt   draft-ietf-netmod-yang-data-ext-01.txt 
Network Working Group A. Bierman Network Working Group A. Bierman
Internet-Draft YumaWorks Internet-Draft YumaWorks
Intended status: Standards Track M. Bjorklund Intended status: Standards Track M. Bjorklund
Expires: August 23, 2018 Tail-f Systems Expires: September 6, 2018 Tail-f Systems
K. Watsen K. Watsen
Juniper Networks Juniper Networks
February 19, 2018 March 5, 2018
YANG Data Extensions YANG Data Extensions
draft-ietf-netmod-yang-data-ext-00 draft-ietf-netmod-yang-data-ext-01
Abstract Abstract
This document describes YANG mechanisms for defining abstract data This document describes YANG mechanisms for defining abstract data
structures with YANG. It is intended to replace and extend the structures with YANG. It is intended to replace and extend the
"yang-data" extension statement defined in RFC 8040. "yang-data" extension statement defined in RFC 8040.
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 35 skipping to change at page 1, line 35
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 August 23, 2018. This Internet-Draft will expire on September 6, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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 13 skipping to change at page 2, line 13
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1. NMDA . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1. NMDA . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2. YANG . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.2. YANG . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. Restrictions on Conceptual YANG Data . . . . . . . . . . 4 2.1. Restrictions on Conceptual YANG Data . . . . . . . . . . 4
2.2. YANG Data Extensions Module . . . . . . . . . . . . . . . 4 2.2. YANG Data Extensions Module . . . . . . . . . . . . . . . 4
3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 9 3.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 9
4. Security Considerations . . . . . . . . . . . . . . . . . . . 9 4. Security Considerations . . . . . . . . . . . . . . . . . . . 9
5. Normative References . . . . . . . . . . . . . . . . . . . . 9 5. Normative References . . . . . . . . . . . . . . . . . . . . 9
Appendix A. Open Issues . . . . . . . . . . . . . . . . . . . . 9 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 10
A.1. uses-yang-data . . . . . . . . . . . . . . . . . . . . . 9 A.1. yang-data Example . . . . . . . . . . . . . . . . . . . . 10
A.2. error-info . . . . . . . . . . . . . . . . . . . . . . . 9 A.2. augment-yang-data Example . . . . . . . . . . . . . . . . 10
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 11
B.1. v00 to v01 . . . . . . . . . . . . . . . . . . . . . . . 11
Appendix C. Open Issues . . . . . . . . . . . . . . . . . . . . 11
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction 1. Introduction
There is a need for standard mechanisms to allow the definition of There is a need for standard mechanisms to allow the definition of
abstract data that is not intended to be implemented as configuration abstract data that is not intended to be implemented as configuration
or operational state. The "yang-data" extension statement from RFC or operational state. The "yang-data" extension statement from RFC
8040 [RFC8040] is defined for this purpose, however it is limited in 8040 [RFC8040] is defined for this purpose, however it is limited in
its functionality. its functionality.
The intended use of the "yang-data" extension is to model all or part The intended use of the "yang-data" extension is to model all or part
skipping to change at page 4, line 36 skipping to change at page 4, line 39
2.2. YANG Data Extensions Module 2.2. YANG Data Extensions Module
The "ietf-yang-data-ext" module defines the "augment-yang-data" The "ietf-yang-data-ext" module defines the "augment-yang-data"
extension to augment conceptual data already defined with the extension to augment conceptual data already defined with the
"yang-data" extension. The RESTCONF "yang-data" extension has been "yang-data" extension. The RESTCONF "yang-data" extension has been
moved to this document and updated. moved to this document and updated.
RFC Ed.: update the date below with the date of RFC publication and RFC Ed.: update the date below with the date of RFC publication and
remove this note. remove this note.
<CODE BEGINS> file "ietf-yang-data-ext@2018-02-19.yang" <CODE BEGINS> file "ietf-yang-data-ext@2018-03-05.yang"
module ietf-yang-data-ext { module ietf-yang-data-ext {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-data-ext"; namespace "urn:ietf:params:xml:ns:yang:ietf-yang-data-ext";
prefix "yd"; prefix "yd";
organization organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group"; "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact contact
skipping to change at page 5, line 25 skipping to change at page 5, line 27
Copyright (c) 2017 - 2018 IETF Trust and the persons identified Copyright (c) 2017 - 2018 IETF Trust and the persons identified
as authors of the code. All rights reserved. as authors of the code. All rights reserved.
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
(http://trustee.ietf.org/license-info)."; (http://trustee.ietf.org/license-info).";
revision 2018-02-19 { revision 2018-03-05 {
description description
"Initial revision."; "Initial revision.";
reference reference
// RFC Ed.: replace XXXX with RFC number and remove this note
"RFC XXXX: YANG Data Extensions."; "RFC XXXX: YANG Data Extensions.";
} }
extension yang-data { extension yang-data {
argument name { argument name {
yin-element true; yin-element true;
} }
description description
"This extension is used to specify a YANG data template which "This extension is used to specify a YANG data template which
represents conceptual data defined in YANG. It is represents conceptual data defined in YANG. It is
skipping to change at page 9, line 9 skipping to change at page 9, line 9
} }
} }
<CODE ENDS> <CODE ENDS>
3. IANA Considerations 3. IANA Considerations
3.1. YANG Module Registry 3.1. YANG Module Registry
TBD This document registers one URI as a namespace in the "IETF XML
Registry" [RFC3688]:
URI: urn:ietf:params:xml:ns:yang:ietf-yang-data-ext
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
This document registers one YANG module in the "YANG Module Names"
registry [RFC6020]:
name: ietf-yang-data-ext
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-data-ext
prefix: yd
// RFC Ed.: replace XXXX with RFC number and remove this note
reference: RFC XXXX
4. Security Considerations 4. Security Considerations
This document defines YANG extensions that are used to define This document defines YANG extensions that are used to define
conceptual YANG data. It does not introduce any new vulnerabilities conceptual YANG data. It does not introduce any new vulnerabilities
beyond those specified in YANG 1.1 [RFC7950]. beyond those specified in YANG 1.1 [RFC7950].
5. Normative References 5. Normative References
[I-D.ietf-netmod-revised-datastores] [I-D.ietf-netmod-revised-datastores]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore and R. Wilton, "Network Management Datastore
Architecture", draft-ietf-netmod-revised-datastores-05 Architecture", draft-ietf-netmod-revised-datastores-10
(work in progress), October 2017. (work in progress), January 2018.
[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,
January 2004.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<http://www.rfc-editor.org/info/rfc7950>. <http://www.rfc-editor.org/info/rfc7950>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<http://www.rfc-editor.org/info/rfc8040>. <http://www.rfc-editor.org/info/rfc8040>.
Appendix A. Open Issues Appendix A. Examples
A.1. uses-yang-data A.1. yang-data Example
Is there a need for a separate grouping and uses mechanism for yang- This example shows a simple address book that could be stored as an
data? Currently only real grouping-stmt and uses-stmt are used. artifact.
A.2. error-info yd:yang-data example-address-book {
container address-book {
list address {
key "last first";
leaf last {
type string;
description "Last name";
}
leaf first {
type string;
description "First name";
}
leaf street {
type string;
description "Street name";
}
leaf city {
type string;
description "City name";
}
leaf state {
type string;
description "State name";
}
}
}
}
Is there a need for a special-purpose extension to define yang-data A.2. augment-yang-data Example
for the contents of the <error-info> node in NETCONF <rpc-error> and
RESTCONF <errors> responses? This node is defined with anyxml so This example adds "county" and "zipcode" leafs to the address book:
there is no way for a YANG tool to use real schema nodes, based on
the RPC operation being requested or the error-app-tag that is being yd:augment-yang-data /address-book/address {
returned. leaf county {
type string;
description "County name";
}
leaf zipcode {
type string;
description "Postal zipcode";
}
}
Appendix B. Change Log
B.1. v00 to v01
o moved open issues to github
o added examples section
o filled in IANA considerations
Appendix C. Open Issues
The YANG Data Extensions issues are tracked on github.com:
https://github.com/netmod-wg/yang-data-ext/issues
Authors' Addresses Authors' Addresses
Andy Bierman Andy Bierman
YumaWorks YumaWorks
Email: andy@yumaworks.com Email: andy@yumaworks.com
Martin Bjorklund Martin Bjorklund
Tail-f Systems Tail-f Systems
 End of changes. 17 change blocks. 
25 lines changed or deleted 100 lines changed or added

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