--- 1/draft-ietf-netconf-yang-patch-03.txt 2015-06-04 21:14:53.892489092 -0700 +++ 2/draft-ietf-netconf-yang-patch-04.txt 2015-06-04 21:14:53.944490361 -0700 @@ -1,21 +1,21 @@ Network Working Group A. Bierman Internet-Draft YumaWorks Intended status: Standards Track M. Bjorklund -Expires: August 3, 2015 Tail-f Systems +Expires: December 6, 2015 Tail-f Systems K. Watsen Juniper Networks - January 30, 2015 + June 4, 2015 YANG Patch Media Type - draft-ietf-netconf-yang-patch-03 + draft-ietf-netconf-yang-patch-04 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 This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. @@ -23,21 +23,21 @@ 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 August 3, 2015. + This Internet-Draft will expire on December 6, 2015. Copyright Notice 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 @@ -45,105 +45,95 @@ 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.1. NETCONF . . . . . . . . . . . . . . . . . . . . . . . 3 - 1.1.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1.2. HTTP . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1.3. YANG . . . . . . . . . . . . . . . . . . . . . . . . 4 - 1.1.4. RESTCONF . . . . . . . . . . . . . . . . . . . . . . 5 - 1.1.5. Terms . . . . . . . . . . . . . . . . . . . . . . . . 5 + 1.1.4. RESTCONF . . . . . . . . . . . . . . . . . . . . . . 4 + 1.1.5. YANG Patch . . . . . . . . . . . . . . . . . . . . . 5 1.1.6. 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.5. Edit Operations . . . . . . . . . . . . . . . . . . . . . 7 2.6. Error Handling . . . . . . . . . . . . . . . . . . . . . 8 - 2.7. yang-patch RESTCONF Capability . . . . . . . . . . . . . 9 - 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 - 4.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 18 + 2.7. yang-patch RESTCONF Capability . . . . . . . . . . . . . 8 + 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 + 4.1. YANG Module Registry . . . . . . . . . . . . . . . . . . 17 4.2. application/yang.patch Media Types . . . . . . . . . . . 18 4.3. application/yang.patch-status Media Types . . . . . . . . 18 4.4. RESTCONF Capability URNs . . . . . . . . . . . . . . . . 19 5. Security Considerations . . . . . . . . . . . . . . . . . . . 19 - 6. Normative References . . . . . . . . . . . . . . . . . . . . 20 + 6. Normative References . . . . . . . . . . . . . . . . . . . . 19 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 20 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 20 - B.1. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 21 - B.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 21 - B.3. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 21 - B.4. bierman:yang-patch-00 to ietf:yang-patch-00 . . . . . . . 22 + B.1. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 20 + B.2. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 21 + B.3. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 21 + B.4. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 21 + B.5. bierman:yang-patch-00 to ietf:yang-patch-00 . . . . . . . 22 Appendix C. Open Issues . . . . . . . . . . . . . . . . . . . . 22 Appendix D. Example YANG Module . . . . . . . . . . . . . . . . 22 D.1. YANG Patch Examples . . . . . . . . . . . . . . . . . . . 23 D.1.1. Add Resources: Error . . . . . . . . . . . . . . . . 23 D.1.2. Add Resources: Success . . . . . . . . . . . . . . . 25 D.1.3. Move list entry example . . . . . . . . . . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28 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. This document defines a media type for a YANG-based editing mechanism - that can be used with the HTTP PATCH method [RFC5789] or custom - NETCONF operations (defined with the YANG rpc-stmt). - - YANG Patch is designed to support multiple protocols with the same - mechanisms. The RESTCONF protocol defined in - [I-D.ietf-netconf-restconf] utilizes YANG Patch with the HTTP PATCH - method. A new RPC operation can be defined to utilize YANG Patch in - the NETCONF protocol. Both the RESTCONF and NETCONF protocols are - designed to utilize the YANG data modeling language to specify - content schema modules. + that can be used with the HTTP PATCH method [RFC5789]. YANG Patch is + designed to support the RESTCONF protocol, defined in + [I-D.ietf-netconf-restconf]. 1.1. Terminology The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119]. 1.1.1. NETCONF The following terms are defined in [RFC6241]: - o candidate configuration datastore - o client o configuration data o datastore o configuration datastore o protocol operation o running configuration datastore o server - o startup configuration datastore - o state data o user 1.1.2. HTTP The following terms are defined in [RFC2616]: o entity tag @@ -188,29 +177,28 @@ o ordered-by system o ordered-by user 1.1.4. RESTCONF The following terms are defined in [I-D.ietf-netconf-restconf]: o data resource - o datasource resource + o datastore resource o patch o RESTCONF capability - o target resource -1.1.5. Terms +1.1.5. YANG Patch The following terms are used within this document: o YANG Patch: a conceptual edit request using the "yang-patch" YANG container, defined in Section 3. In HTTP, refers to a PATCH method where the media type is "application/yang.patch+xml" or "application/yang.patch+json". o YANG Patch Status: a conceptual edit status response using the YANG "yang-patch-status" container, defined in Section 3. In @@ -234,23 +222,22 @@ o Parentheses enclose choice and case nodes, and case nodes are also marked with a colon (":"). o Ellipsis ("...") stands for contents of subtrees that are not shown. 2. YANG Patch A "YANG Patch" is an ordered list of edits that are applied to the - target datastore by the server. The specific fields are defined with - the 'application/yang.patch' extension definition in the YANG module - Section 3. + target datastore by the server. The specific fields are defined in + the YANG module in Section 3. For RESTCONF, the YANG Patch operation is invoked by the client by sending a PATCH method request with the YANG Patch media type. A message body representing the YANG Patch input parameters MUST be provided. The RESTCONF server MUST return the Accept-Patch header in an OPTIONS response, as specified in [RFC5789], which includes the media type for YANG Patch. @@ -260,30 +247,38 @@ 2.1. Target Resource The YANG Patch operation uses a conceptual root within a NETCONF configuration datastore to identity the patch point for the edit operation. This root can be the datastore itself, or 1 or more data nodes within the datastore. For RESTCONF, the target resource is derived from the request URI. - For NETCONF, the target resource MUST be defined as an input - parameter in the YANG "rpc" statement. - 2.2. yang-patch Input + A YANG patch is optionally identified by a unique "patch-id" and it + may have an optional comment. A patch is an ordered collection of + edits. Each edit is identified by an "edit-id" and it has an edit + operation (create, delete, insert, merge, move, replace, remove) that + is applied to the target resource. Each edit can be applied to a + sub-resource "target" within the target resource. If the operation + is "insert" or "move", then the "where" parameter indicates how the + node is inserted or moved. For values "before" and "after", the + "point" parameter specifies the data node insertion point. + A data element representing the YANG Patch is sent by the client to specify the edit operation request. When used with the HTTP PATCH method, this data is identified by the YANG Patch media type. YANG Tree Diagram For "yang-patch" Container + +--rw yang-patch +--rw patch-id? string +--rw comment? string +--rw edit [edit-id] +--rw edit-id string +--rw operation enumeration +--rw target target-resource-offset +--rw point? target-resource-offset +--rw where? enumeration +--rw value @@ -286,22 +281,21 @@ +--rw target target-resource-offset +--rw point? target-resource-offset +--rw where? enumeration +--rw value 2.3. yang-patch-status Output A data element representing the YANG Patch Status is returned to the client to report the detailed status of the edit operation. When used with the HTTP PATCH method, this data is identified by the YANG - Patch Status media type, and the syntax specification is defined by - the 'application/yang.patch-status' extension statement defined in + Patch Status media type, and the syntax specification is defined in Section 3. YANG Tree Diagram For "yang-patch-status" Container: +--rw yang-patch-status +--rw patch-id? string +--rw (global-status)? | +--:(global-errors) | | +--ro errors | | @@ -355,27 +349,25 @@ YANG Patch Edit Operations 2.6. Error Handling If a well-formed, schema-valid YANG Patch message is received, then the server will process the supplied edits in ascending order. The following error modes apply to the processing of this edit list: All the specified edits MUST be applied or the target datastore - contents SHOULD be returned to its original state before the PATCH - method started. The server MAY fail to restore the contents of the - target datastore completely and with certainty. It is possible for a - rollback to fail or an "undo" operation to fail. + contents MUST be returned to its original state before the PATCH + method started. The server will save the running datastore to non-volatile storage if - it has changed, after the edits have been attempted. + it has changed, after the edits have been successfully completed. 2.7. yang-patch RESTCONF Capability A URI is defined to identify the YANG Patch extension to the base RESTCONF protocol. If the server supports the YANG Patch media type, then the "yang-patch" RESTCONF capability defined in Section 4.4 MUST be present in the "capability" leaf-list in the "ietf-restconf-monitoring" module defined in [I-D.ietf-netconf-restconf]. @@ -384,29 +376,31 @@ The "ietf-yang-patch" module defines conceptual definitions with the 'restconf-media-type' extension statements, which are not meant to be implemented as datastore contents by a server. The "ietf-restconf" module from [I-D.ietf-netconf-restconf] is used by this module for the 'restconf-media-type' extension definition. RFC Ed.: update the date below with the date of RFC publication and remove this note. - file "ietf-yang-patch@2015-01-24.yang" + file "ietf-yang-patch@2015-04-30.yang" module ietf-yang-patch { namespace "urn:ietf:params:xml:ns:yang:ietf-yang-patch"; prefix "ypatch"; + import ietf-yang-types { prefix yang; } + import ietf-restconf { prefix rc; - revision-date 2015-01-30; + revision-date 2015-06-04; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: WG List: WG Chair: Mehmet Ersue @@ -447,37 +441,35 @@ 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-03.txt // RFC Ed.: update the date below with the date of RFC publication // and remove this note. - revision 2015-01-30 { + revision 2015-06-04 { description "Initial revision."; reference "RFC XXXX: YANG Patch Media Type."; } typedef target-resource-offset { - type string { - length "1 .. max"; - } + type yang:xpath1.0; description - "Contains a relative Data Resource Identifier formatted string - to identify a specific data sub-resource instance. - The document root for all data resources is a - target data resource that is specified in the - object definition using this data type."; + "Contains an XPath absolute path expression identifying + a sub-resource within the target resource. + The document root for this XPath expression is the + target resource that is specified in the + protocol operation (e.g., the URI for the PATCH request)."; } rc:restconf-media-type "application/yang.patch" { uses yang-patch; } rc:restconf-media-type "application/yang.patch-status" { uses yang-patch-status; } @@ -490,50 +482,44 @@ container yang-patch { description "Represents a conceptual sequence of datastore edits, called a patch. Each patch is given a client-assigned patch identifier. Each edit MUST be applied in ascending order, and all edits MUST be applied. If any errors occur, then the target datastore MUST NOT be changed by the patch operation. - A patch MUST be validated by the server to be a - well-formed message before any of the patch edits - are validated or attempted. - YANG datastore validation (defined in RFC 6020, section - 8.3.3) is performed after all edits have been - individually validated. + 8.3.3) is performed before any edits have been applied + to the running datastore. It is possible for a datastore constraint violation to occur due to any node in the datastore, including nodes not included in the edit list. Any validation errors MUST be reported in the reply message."; reference "RFC 6020, section 8.3."; leaf patch-id { type string; description "An arbitrary string provided by the client to identify the entire patch. This value SHOULD be present in any audit logging records generated by the server for the patch. Error messages returned by the server pertaining to this patch will be identified by this patch-id value."; } leaf comment { - type string { - length "0 .. 1024"; - } + type string; description "An arbitrary string provided by the client to describe the entire patch. This value SHOULD be present in any audit logging records generated by the server for the patch."; } list edit { key edit-id; ordered-by user; @@ -571,32 +557,38 @@ } enum delete { description "Delete the target node, only if the data resource currently exists, otherwise return an error."; } enum insert { description "Insert the supplied value into a user-ordered list or leaf-list entry. The target node must - represent a new data resource."; + represent a new data resource. If the 'where' + parameter is set to 'before' or 'after', then + the 'point' parameter identifies the insertion + point for the target node."; } enum merge { description "The supplied value is merged with the target data node."; } enum move { description "Move the target node. Reorder a user-ordered list or leaf-list. The target node must represent - an existing data resource."; + an existing data resource. If the 'where' parameter + is set to 'before' or 'after', then the 'point' + parameter identifies the insertion point to move + the target node."; } enum replace { description "The supplied value is used to replace the target data node."; } enum remove { description "Delete the target node if it currently exists."; } @@ -819,58 +814,58 @@ 4.2. application/yang.patch Media Types The MIME media type for a YANG Patch document is application/ yang.patch. Type name: application Subtype name: yang.patch - Required parameters: TBD + Required parameters: none - Optional parameters: TBD + Optional parameters: none - Encoding considerations: TBD + Encoding considerations: 8-bit - Security considerations: TBD + Security considerations: See Section 5 of RFC XXXX - Interoperability considerations: TBD + Interoperability considerations: none // RFC Ed.: replace XXXX with RFC number and remove this note Published specification: RFC XXXX 4.3. application/yang.patch-status Media Types The MIME media type for a YANG Patch status document is application/ yang.patch-status. Type name: application Subtype name: yang.patch-status - Required parameters: TBD + Required parameters: none - Optional parameters: TBD + Optional parameters: none - Encoding considerations: TBD + Encoding considerations: 8-bit - Security considerations: TBD + Security considerations: See Section 5 of RFC XXXX - Interoperability considerations: TBD + Interoperability considerations: none // RFC Ed.: replace XXXX with RFC number and remove this note Published specification: RFC XXXX 4.4. RESTCONF Capability URNs - This document registers several capability identifiers in "RESTCONF + This document registers one capability identifier in "RESTCONF Protocol Capability URNs" registry Index Capability Identifier ------------------------ :yang-patch urn:ietf:params:restconf:capability:yang-patch:1.0 5. Security Considerations @@ -888,22 +883,22 @@ A server implementation SHOULD attempt to prevent system disruption due to partial processing of the YANG Patch edit list. It may be possible to construct an attack on such a server, which relies on the edit processing order mandated by YANG Patch. 6. Normative References [I-D.ietf-netconf-restconf] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF - Protocol", draft-ietf-netconf-restconf-04 (work in - progress), January 2015. + Protocol", draft-ietf-netconf-restconf-05 (work in + progress), June 2015. [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. @@ -931,43 +926,63 @@ Appendix A. Acknowledgements The authors would like to thank the following people for their contributions to this document: Rex Fernando. Appendix B. Change Log -- RFC Ed.: remove this section before publication. -B.1. 02 to 03 + The YANG Patch issue tracker can be found here: https://github.com/ + netconf-wg/yang-patch/issues + +B.1. 03 to 04 + + o removed NETCONF specific text + + o changed data-resource-offset typedef from a relative URI to an + XPath absolute path expression + + o clarified insert operation + + o removed requirement that edits MUST be applied in ascending order + + o change SHOULD keep datastore unchanged on error to MUST (this is + required by HTTP PATCH) + + o removed length restriction on 'comment' leaf + o updated YANG tree for example-jukebox library + +B.2. 02 to 03 o added usage of restconf-media-type extension to map the yang-patch and yang-patch-status groupings to media types o added yang-patch RESTCONF capability URI o Added sub-section for terms used from RESTCONF o filled in security considerations section -B.2. 01 to 02 +B.3. 01 to 02 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 -B.3. 00 to 01 +B.4. 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 there is no concern @@ -991,80 +1006,80 @@ 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. -B.4. bierman:yang-patch-00 to ietf:yang-patch-00 +B.5. bierman:yang-patch-00 to ietf:yang-patch-00 o Created open issues section Appendix C. Open Issues -- RFC Ed.: remove this section before publication. Refer to the github issue tracker for any open issues: https://github.com/netconf-wg/yang-patch/issues Appendix D. 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 [I-D.ietf-netconf-restconf]. YANG Tree Diagram for "example-jukebox" Module: - +--rw jukebox? + +--rw jukebox! +--rw library - | +--rw artist [name] + | +--rw artist* [name] | | +--rw name string - | | +--rw album [name] + | | +--rw album* [name] | | +--rw name string | | +--rw genre? identityref | | +--rw year? uint16 | | +--rw admin | | | +--rw label? string | | | +--rw catalogue-number? string - | | +--rw song [name] + | | +--rw song* [name] | | +--rw name string | | +--rw location string | | +--rw format? string | | +--rw length? uint32 | +--ro artist-count? uint32 | +--ro album-count? uint32 | +--ro song-count? uint32 - +--rw playlist [name] + +--rw playlist* [name] | +--rw name string | +--rw description? string - | +--rw song [index] + | +--rw song* [index] | +--rw index uint32 - | +--rw id instance-identifier + | +--rw id leafref +--rw player +--rw gap? decimal64 rpcs: +---x play +--ro input +--ro playlist string +--ro song-number uint32 D.1. YANG Patch Examples - This section includes RESTCONF examples. NETCONF examples are TBD. - Most examples are shown in JSON encoding [RFC7158], and some are - shown in XML encoding [W3C.REC-xml-20081126]. + This section includes RESTCONF examples. Most examples are shown in + JSON encoding [RFC7158], and some are shown in XML encoding + [W3C.REC-xml-20081126]. D.1.1. Add Resources: Error The following example shows several songs being added to an existing album. Each edit contains one song. The first song already exists, so an error will be reported for that edit. The rest of the edits were not attempted, since the first edit failed. Request from client: @@ -1072,47 +1087,47 @@ library/artist=Foo%20Fighters/album=Wasting%20Light HTTP/1.1 Host: example.com Accept: application/yang.patch-status+json Content-Type: application/yang.patch+json { "ietf-yang-patch:yang-patch" : { "patch-id" : "add-songs-patch", "edit" : [ { - "edit-id" : 1, + "edit-id" : "edit1", "operation" : "create", "target" : "/song", "value" : { "song" : { "name" : "Bridge Burning", "location" : "/media/bridge_burning.mp3", "format" : "MP3", "length" : 288 } } }, { - "edit-id" : 2, + "edit-id" : "edit2", "operation" : "create", "target" : "/song", "value" : { "song" : { "name" : "Rope", "location" : "/media/rope.mp3", "format" : "MP3", "length" : 259 } } }, { - "edit-id" : 3, + "edit-id" : "edit3", "operation" : "create", "target" : "/song", "value" : { "song" : { "name" : "Dear Rosemary", "location" : "/media/dear_rosemary.mp3", "format" : "MP3", "length" : 269 } @@ -1129,21 +1144,21 @@ Server: example-server Last-Modified: Mon, 23 Apr 2012 13:01:20 GMT Content-Type: application/yang.patch-status+json { "ietf-yang-patch:yang-patch-status" : { "patch-id" : "add-songs-patch", "edit-status" : { "edit" : [ { - "edit-id" : 1, + "edit-id" : "edit1", "errors" : { "error" : [ { "error-type": "application", "error-tag": "data-exists", "error-path": "/example-jukebox:jukebox/library /artist=Foo%20Fighters/album=Wasting%20Light /song=Burning%20Light", "error-message": "Data already exists, cannot be created" @@ -1172,34 +1187,34 @@ HTTP/1.1 Host: example.com Accept: application/yang.patch-status+json Content-Type: application/yang.patch+json { "ietf-yang-patch:yang-patch" : { "patch-id" : "add-songs-patch-2", "edit" : [ { - "edit-id" : 1, + "edit-id" : "edit1", "operation" : "create", "target" : "/song", "value" : { "song" : { "name" : "Rope", "location" : "/media/rope.mp3", "format" : "MP3", "length" : 259 } } }, { - "edit-id" : 2, + "edit-id" : "edit2", "operation" : "create", "target" : "/song", "value" : { "song" : { "name" : "Dear Rosemary", "location" : "/media/dear_rosemary.mp3", "format" : "MP3", "length" : 269 } } @@ -1237,21 +1252,21 @@ Host: example.com Accept: application/yang.patch-status+json Content-Type: application/yang.patch+json { "ietf-yang-patch:yang-patch" : { "patch-id" : "move-song-patch", "comment" : "Move song 1 after song 3", "edit" : [ { - "edit-id" : 1, + "edit-id" : "edit1", "operation" : "move", "target" : "/song/1", "point" : "/song3", "where" : "after" } ] } } Response from server: