--- 1/draft-ietf-netconf-yang-patch-01.txt 2015-01-02 11:14:50.610495434 -0800 +++ 2/draft-ietf-netconf-yang-patch-02.txt 2015-01-02 11:14:50.658496622 -0800 @@ -1,94 +1,95 @@ Network Working Group A. Bierman Internet-Draft YumaWorks Intended status: Standards Track M. Bjorklund -Expires: January 4, 2015 Tail-f Systems +Expires: July 6, 2015 Tail-f Systems K. Watsen Juniper Networks R. Fernando Cisco - July 3, 2014 + January 2, 2015 YANG Patch Media Type - draft-ietf-netconf-yang-patch-01 + draft-ietf-netconf-yang-patch-02 Abstract This document describes a method for applying patches to NETCONF 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 provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference 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 (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. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents - 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 + 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1. NETCONF . . . . . . . . . . . . . . . . . . . . . . . 3 - 1.1.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 1.1.3. YANG . . . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1.3. YANG . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.4. Terms . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1.5. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 5 - 2. YANG Patch . . . . . . . . . . . . . . . . . . . . . . . . . . 6 + 2. YANG Patch . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Target Resource . . . . . . . . . . . . . . . . . . . . . 6 - 2.2. yang-patch Input . . . . . . . . . . . . . . . . . . . . . 6 - 2.3. yang-patch-status Output . . . . . . . . . . . . . . . . . 7 - 2.4. Target Data Node . . . . . . . . . . . . . . . . . . . . . 7 - 2.5. Edit Operations . . . . . . . . . . . . . . . . . . . . . 8 - 2.6. Error Handling . . . . . . . . . . . . . . . . . . . . . . 8 - 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 - 4.1. YANG Module Registry . . . . . . . . . . . . . . . . . . . 18 - 4.2. application/yang.patch Media Types . . . . . . . . . . . . 18 + 2.2. yang-patch Input . . . . . . . . . . . . . . . . . . . . 6 + 2.3. yang-patch-status Output . . . . . . . . . . . . . . . . 6 + 2.4. Target Data Node . . . . . . . . . . . . . . . . . . . . 7 + 2.5. Edit Operations . . . . . . . . . . . . . . . . . . . . . 7 + 2.6. Error Handling . . . . . . . . . . . . . . . . . . . . . 8 + 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 + 4.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 17 + 4.2. application/yang.patch Media Types . . . . . . . . . . . 17 4.3. application/yang.patch-status Media Types . . . . . . . . 18 - 5. Security Considerations . . . . . . . . . . . . . . . . . . . 20 - 6. Normative References . . . . . . . . . . . . . . . . . . . . . 21 - Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 22 - A.1. bierman:yang-patch-00 to ietf:yang-patch-00 . . . . . . . 22 - A.2. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . . 22 - Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . . 23 - Appendix C. Example YANG Module . . . . . . . . . . . . . . . . . 24 - C.1. YANG Patch Examples . . . . . . . . . . . . . . . . . . . 25 - C.1.1. Add Resources: Error . . . . . . . . . . . . . . . . . 25 - C.1.2. Add Resources: Success . . . . . . . . . . . . . . . . 27 - C.1.3. Move list entry example . . . . . . . . . . . . . . . 28 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 30 + 5. Security Considerations . . . . . . . . . . . . . . . . . . . 18 + 6. Normative References . . . . . . . . . . . . . . . . . . . . 18 + Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 19 + A.1. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 19 + A.2. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 20 + A.3. bierman:yang-patch-00 to ietf:yang-patch-00 . . . . . . . 21 + Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 21 + Appendix C. Example YANG Module . . . . . . . . . . . . . . . . 21 + C.1. YANG Patch Examples . . . . . . . . . . . . . . . . . . . 22 + C.1.1. Add Resources: Error . . . . . . . . . . . . . . . . 22 + C.1.2. Add Resources: Success . . . . . . . . . . . . . . . 24 + C.1.3. Move list entry example . . . . . . . . . . . . . . . 25 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 1. Introduction There is a need for standard mechanisms to patch NETCONF [RFC6241] datastores which contain conceptual data that conforms to schema specified with YANG [RFC6020]. An "ordered edit list" approach is needed to provide client developers with a simpler edit request format that can be more efficient and also allow more precise client control of the transaction procedure than existing mechanisms. @@ -357,22 +361,21 @@ The "ietf-yang-types" and "ietf-inet_types" modules from [RFC6991] are used by this module for some type definitions. The "ietf-restconf" module from [RESTCONF] is used by this module for a grouping definition. RFC Ed.: update the date below with the date of RFC publication and remove this note. - file "ietf-yang-patch@2014-07-03.yang" - + file "ietf-yang-patch@2015-01-02.yang" module ietf-yang-patch { namespace "urn:ietf:params:xml:ns:yang:ietf-yang-patch"; prefix "ypatch"; import ietf-restconf { prefix rc; } organization "IETF NETCONF (Network Configuration) Working Group"; contact @@ -416,25 +419,25 @@ Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and 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 // and remove this note. - revision 2014-07-03 { + revision 2015-01-02 { description "Initial revision."; reference "RFC XXXX: YANG Patch"; } typedef target-resource-offset { type string { length "1 .. max"; } @@ -635,21 +639,43 @@ anyxml value { when "(../operation = 'create' or " + "../operation = 'merge' " + "or ../operation = 'replace' or " + "../operation = 'insert')" { description "Value node only used for create, merge, replace, and insert operations"; } 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: + + + + some value + 42 + + + "; } } } } // grouping yang-patch grouping yang-patch-status { description "A grouping that contains a YANG container @@ -807,36 +833,36 @@ // RFC Ed.: replace XXXX with RFC number and remove this note Published specification: RFC XXXX 5. Security Considerations TBD 6. Normative References [RESTCONF] - Bierman, A., Bjorklund, M., Watsen, K., and R. Fernando, - "RESTCONF Protocol", draft-ietf-netconf-restconf-01 (work - in progress), July 2014. + Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF + Protocol", draft-ietf-netconf-restconf-03 (work in + progress), October 2014. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. - [RFC5789] Dusseault, L. and J. Snell, "PATCH Method for HTTP", - RFC 5789, March 2010. + [RFC5789] Dusseault, L. and J. Snell, "PATCH Method for HTTP", RFC + 5789, March 2010. [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011. [RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, @@ -849,35 +875,41 @@ Yergeau, F., Maler, E., Paoli, J., Sperberg-McQueen, C., and T. Bray, "Extensible Markup Language (XML) 1.0 (Fifth Edition)", World Wide Web Consortium Recommendation REC- xml-20081126, November 2008, . Appendix A. Change Log -- 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 o Added text requiring support for Accept-Patch header, and removed 'Identification of YANG Patch capabilities' open issue. o Removed 'location' leaf from yang-patch-status grouping o Removed open issue 'Protocol independence' because the location 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 YANG 1.1 mechanism to allow protocol template usage (instead of grouping wrapper). o Removed open issue 'Is the delete operation needed'. It was decided that both delete and remove should remain as operations and clients can choose which one to use. This is not an implementation burden on the server. o Removed open issue 'global-errors needed'. It was decided that @@ -891,25 +923,31 @@ o Removed open issue 'Bulk editing support in yang-patch-status'. The 'location' leaf has been removed so this issue is no longer applicable. o Removed open issue 'Edit list mechanism'. Added text to the 'edit' list description-stmt about how the individual edits must be processed. There is no concern about duplicate edits which cause intermediate results to be altered by subsequent edits in the same edit list. +A.3. bierman:yang-patch-00 to ietf:yang-patch-00 + + o Created open issues section + Appendix B. Open Issues -- 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 The example YANG module used in this document represents a simple media jukebox interface. The "example-jukebox" YANG module is defined in [RESTCONF]. YANG Tree Diagram for "example-jukebox" Module: +--rw jukebox?