draft-ietf-netconf-yang-patch-01.txt   draft-ietf-netconf-yang-patch-02.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: January 4, 2015 Tail-f Systems Expires: July 6, 2015 Tail-f Systems
K. Watsen K. Watsen
Juniper Networks Juniper Networks
R. Fernando R. Fernando
Cisco Cisco
July 3, 2014 January 2, 2015
YANG Patch Media Type YANG Patch Media Type
draft-ietf-netconf-yang-patch-01 draft-ietf-netconf-yang-patch-02
Abstract Abstract
This document describes a method for applying patches to NETCONF This document describes a method for applying patches to NETCONF
datastores using data defined with the YANG data modeling language. datastores using data defined with the YANG data modeling language.
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
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 January 4, 2015. This Internet-Draft will expire on July 6, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2015 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1. NETCONF . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1. NETCONF . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.3. YANG . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.3. YANG . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.4. Terms . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1.4. Terms . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.5. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 5 1.1.5. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 5
2. YANG Patch . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2. YANG Patch . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. Target Resource . . . . . . . . . . . . . . . . . . . . . 6 2.1. Target Resource . . . . . . . . . . . . . . . . . . . . . 6
2.2. yang-patch Input . . . . . . . . . . . . . . . . . . . . . 6 2.2. yang-patch Input . . . . . . . . . . . . . . . . . . . . 6
2.3. yang-patch-status Output . . . . . . . . . . . . . . . . . 7 2.3. yang-patch-status Output . . . . . . . . . . . . . . . . 6
2.4. Target Data Node . . . . . . . . . . . . . . . . . . . . . 7 2.4. Target Data Node . . . . . . . . . . . . . . . . . . . . 7
2.5. Edit Operations . . . . . . . . . . . . . . . . . . . . . 8 2.5. Edit Operations . . . . . . . . . . . . . . . . . . . . . 7
2.6. Error Handling . . . . . . . . . . . . . . . . . . . . . . 8 2.6. Error Handling . . . . . . . . . . . . . . . . . . . . . 8
3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 9 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 8
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
4.1. YANG Module Registry . . . . . . . . . . . . . . . . . . . 18 4.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 17
4.2. application/yang.patch Media Types . . . . . . . . . . . . 18 4.2. application/yang.patch Media Types . . . . . . . . . . . 17
4.3. application/yang.patch-status Media Types . . . . . . . . 18 4.3. application/yang.patch-status Media Types . . . . . . . . 18
5. Security Considerations . . . . . . . . . . . . . . . . . . . 20 5. Security Considerations . . . . . . . . . . . . . . . . . . . 18
6. Normative References . . . . . . . . . . . . . . . . . . . . . 21 6. Normative References . . . . . . . . . . . . . . . . . . . . 18
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 22 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 19
A.1. bierman:yang-patch-00 to ietf:yang-patch-00 . . . . . . . 22 A.1. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 19
A.2. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . . 22 A.2. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 20
Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . . 23 A.3. bierman:yang-patch-00 to ietf:yang-patch-00 . . . . . . . 21
Appendix C. Example YANG Module . . . . . . . . . . . . . . . . . 24 Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 21
C.1. YANG Patch Examples . . . . . . . . . . . . . . . . . . . 25 Appendix C. Example YANG Module . . . . . . . . . . . . . . . . 21
C.1.1. Add Resources: Error . . . . . . . . . . . . . . . . . 25 C.1. YANG Patch Examples . . . . . . . . . . . . . . . . . . . 22
C.1.2. Add Resources: Success . . . . . . . . . . . . . . . . 27 C.1.1. Add Resources: Error . . . . . . . . . . . . . . . . 22
C.1.3. Move list entry example . . . . . . . . . . . . . . . 28 C.1.2. Add Resources: Success . . . . . . . . . . . . . . . 24
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 30 C.1.3. Move list entry example . . . . . . . . . . . . . . . 25
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26
1. Introduction 1. Introduction
There is a need for standard mechanisms to patch NETCONF [RFC6241] There is a need for standard mechanisms to patch NETCONF [RFC6241]
datastores which contain conceptual data that conforms to schema datastores which contain conceptual data that conforms to schema
specified with YANG [RFC6020]. An "ordered edit list" approach is specified with YANG [RFC6020]. An "ordered edit list" approach is
needed to provide client developers with a simpler edit request needed to provide client developers with a simpler edit request
format that can be more efficient and also allow more precise client format that can be more efficient and also allow more precise client
control of the transaction procedure than existing mechanisms. control of the transaction procedure than existing mechanisms.
skipping to change at page 9, line 20 skipping to change at page 8, line 52
The "ietf-yang-types" and "ietf-inet_types" modules from [RFC6991] The "ietf-yang-types" and "ietf-inet_types" modules from [RFC6991]
are used by this module for some type definitions. are used by this module for some type definitions.
The "ietf-restconf" module from [RESTCONF] is used by this module for The "ietf-restconf" module from [RESTCONF] is used by this module for
a grouping definition. a grouping definition.
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-patch@2014-07-03.yang" <CODE BEGINS> file "ietf-yang-patch@2015-01-02.yang"
module ietf-yang-patch { module ietf-yang-patch {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-patch"; namespace "urn:ietf:params:xml:ns:yang:ietf-yang-patch";
prefix "ypatch"; prefix "ypatch";
import ietf-restconf { prefix rc; } import ietf-restconf { prefix rc; }
organization organization
"IETF NETCONF (Network Configuration) Working Group"; "IETF NETCONF (Network Configuration) Working Group";
contact contact
skipping to change at page 10, line 31 skipping to change at page 10, line 13
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 // RFC Ed.: replace XXXX with actual RFC number and remove this
// note. // note.
// RFC Ed.: remove this note // RFC Ed.: remove this note
// Note: extracted from draft-ietf-netconf-yang-patch-01.txt // Note: extracted from draft-ietf-netconf-yang-patch-02.txt
// RFC Ed.: update the date below with the date of RFC publication // RFC Ed.: update the date below with the date of RFC publication
// and remove this note. // and remove this note.
revision 2014-07-03 { revision 2015-01-02 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: YANG Patch"; "RFC XXXX: YANG Patch";
} }
typedef target-resource-offset { typedef target-resource-offset {
type string { type string {
length "1 .. max"; length "1 .. max";
} }
skipping to change at page 15, line 9 skipping to change at page 14, line 41
anyxml value { anyxml value {
when "(../operation = 'create' or " + when "(../operation = 'create' or " +
"../operation = 'merge' " + "../operation = 'merge' " +
"or ../operation = 'replace' or " + "or ../operation = 'replace' or " +
"../operation = 'insert')" { "../operation = 'insert')" {
description description
"Value node only used for create, merge, "Value node only used for create, merge,
replace, and insert operations"; replace, and insert operations";
} }
description description
"Value used for this edit operation."; "Value used for this edit operation.
The anyxml value MUST represent a container with
exactly one child node, which MUST identify the
target resource associated with the 'target' leaf.
For example, suppose the target node is a YANG container
named foo:
container foo {
leaf a { type string; }
leaf b { type int32; }
}
The value node will contain one instance of foo:
<value>
<foo xmlns='example-foo-namespace'>
<a>some value</a>
<b>42</b>
</foo>
</value>
";
} }
} }
} }
} // grouping yang-patch } // grouping yang-patch
grouping yang-patch-status { grouping yang-patch-status {
description description
"A grouping that contains a YANG container "A grouping that contains a YANG container
skipping to change at page 21, line 8 skipping to change at page 19, line 6
// RFC Ed.: replace XXXX with RFC number and remove this note // RFC Ed.: replace XXXX with RFC number and remove this note
Published specification: RFC XXXX Published specification: RFC XXXX
5. Security Considerations 5. Security Considerations
TBD TBD
6. Normative References 6. Normative References
[RESTCONF] [RESTCONF]
Bierman, A., Bjorklund, M., Watsen, K., and R. Fernando, Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
"RESTCONF Protocol", draft-ietf-netconf-restconf-01 (work Protocol", draft-ietf-netconf-restconf-03 (work in
in progress), July 2014. progress), October 2014.
[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.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[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.
[RFC5789] Dusseault, L. and J. Snell, "PATCH Method for HTTP", [RFC5789] Dusseault, L. and J. Snell, "PATCH Method for HTTP", RFC
RFC 5789, March 2010. 5789, March 2010.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020, Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010. October 2010.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, June 2011. (NETCONF)", RFC 6241, June 2011.
[RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
skipping to change at page 22, line 9 skipping to change at page 19, line 48
Yergeau, F., Maler, E., Paoli, J., Sperberg-McQueen, C., Yergeau, F., Maler, E., Paoli, J., Sperberg-McQueen, C.,
and T. Bray, "Extensible Markup Language (XML) 1.0 (Fifth and T. Bray, "Extensible Markup Language (XML) 1.0 (Fifth
Edition)", World Wide Web Consortium Recommendation REC- Edition)", World Wide Web Consortium Recommendation REC-
xml-20081126, November 2008, xml-20081126, November 2008,
<http://www.w3.org/TR/2008/REC-xml-20081126>. <http://www.w3.org/TR/2008/REC-xml-20081126>.
Appendix A. Change Log Appendix A. Change Log
-- RFC Ed.: remove this section before publication. -- RFC Ed.: remove this section before publication.
A.1. bierman:yang-patch-00 to ietf:yang-patch-00 A.1. 01 to 02
o Created open issues section o Reversed order of change log
o Clarified anyxml structure of "value" parameter within a YANG
patch request (github issue #1)
o Updated RESTCONF reference
o Added note to open issues section to check github instead
A.2. 00 to 01 A.2. 00 to 01
o Added text requiring support for Accept-Patch header, and removed o Added text requiring support for Accept-Patch header, and removed
'Identification of YANG Patch capabilities' open issue. 'Identification of YANG Patch capabilities' open issue.
o Removed 'location' leaf from yang-patch-status grouping o Removed 'location' leaf from yang-patch-status grouping
o Removed open issue 'Protocol independence' because the location o Removed open issue 'Protocol independence' because the location
leaf was removed. leaf was removed.
o Removed open issue 'RESTCONF coupling' because thre is no concern o Removed open issue 'RESTCONF coupling' because there is no concern
about a normative reference to RESTCONF. There may need to be a about a normative reference to RESTCONF. There may need to be a
YANG 1.1 mechanism to allow protocol template usage (instead of YANG 1.1 mechanism to allow protocol template usage (instead of
grouping wrapper). grouping wrapper).
o Removed open issue 'Is the delete operation needed'. It was o Removed open issue 'Is the delete operation needed'. It was
decided that both delete and remove should remain as operations decided that both delete and remove should remain as operations
and clients can choose which one to use. This is not an and clients can choose which one to use. This is not an
implementation burden on the server. implementation burden on the server.
o Removed open issue 'global-errors needed'. It was decided that o Removed open issue 'global-errors needed'. It was decided that
skipping to change at page 23, line 5 skipping to change at page 21, line 5
o Removed open issue 'Bulk editing support in yang-patch-status'. o Removed open issue 'Bulk editing support in yang-patch-status'.
The 'location' leaf has been removed so this issue is no longer The 'location' leaf has been removed so this issue is no longer
applicable. applicable.
o Removed open issue 'Edit list mechanism'. Added text to the o Removed open issue 'Edit list mechanism'. Added text to the
'edit' list description-stmt about how the individual edits must 'edit' list description-stmt about how the individual edits must
be processed. There is no concern about duplicate edits which be processed. There is no concern about duplicate edits which
cause intermediate results to be altered by subsequent edits in cause intermediate results to be altered by subsequent edits in
the same edit list. the same edit list.
A.3. bierman:yang-patch-00 to ietf:yang-patch-00
o Created open issues section
Appendix B. Open Issues Appendix B. Open Issues
-- RFC Ed.: remove this section before publication. -- RFC Ed.: remove this section before publication.
o There are no open issues at this time. Refer to the github issue tracker for any open issues:
https://github.com/netconf-wg/yang-patch/issues
Appendix C. Example YANG Module Appendix C. Example YANG Module
The example YANG module used in this document represents a simple The example YANG module used in this document represents a simple
media jukebox interface. The "example-jukebox" YANG module is media jukebox interface. The "example-jukebox" YANG module is
defined in [RESTCONF]. defined in [RESTCONF].
YANG Tree Diagram for "example-jukebox" Module: YANG Tree Diagram for "example-jukebox" Module:
+--rw jukebox? +--rw jukebox?
 End of changes. 18 change blocks. 
51 lines changed or deleted 85 lines changed or added

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