draft-ietf-netconf-yang-patch-13.txt   draft-ietf-netconf-yang-patch-14.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: May 13, 2017 Tail-f Systems Expires: May 26, 2017 Tail-f Systems
K. Watsen K. Watsen
Juniper Networks Juniper Networks
November 9, 2016 November 22, 2016
YANG Patch Media Type YANG Patch Media Type
draft-ietf-netconf-yang-patch-13 draft-ietf-netconf-yang-patch-14
Abstract Abstract
This document describes a method for applying patches to This document describes a method for applying patches to
configuration datastores using data defined with the YANG data configuration datastores using data defined with the YANG data
modeling language. 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
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 May 13, 2017. This Internet-Draft will expire on May 26, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 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 13, line 37 skipping to change at page 13, line 37
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-13.txt // Note: extracted from draft-ietf-netconf-yang-patch-14.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 2016-11-09 { revision 2016-11-09 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: YANG Patch Media Type."; "RFC XXXX: YANG Patch Media Type.";
} }
skipping to change at page 22, line 4 skipping to change at page 22, line 4
Subtype name: yang-patch+xml Subtype name: yang-patch+xml
Required parameters: None Required parameters: None
Optional parameters: None Optional parameters: None
// RFC Ed.: replace 'XXXX' with the real RFC number, // RFC Ed.: replace 'XXXX' with the real RFC number,
// and remove this note // and remove this note
Encoding considerations: 8-bit Encoding considerations: 8-bit
The utf-8 charset is always used for this type.
Each conceptual YANG data node is encoded according to the Each conceptual YANG data node is encoded according to the
XML Encoding Rules and Canonical Format for the specific XML Encoding Rules and Canonical Format for the specific
YANG data node type defined in [RFC7950]. YANG data node type defined in [RFC7950].
In addition, the "yang-patch" YANG Patch template found In addition, the "yang-patch" YANG Patch template found
in [RFCXXXX] defines the structure of a YANG Patch request. in [RFCXXXX] defines the structure of a YANG Patch request.
// RFC Ed.: replace 'NN' in Section NN of [RFCXXXX] with the // RFC Ed.: replace 'NN' in Section NN of [RFCXXXX] with the
// section number for Security Considerations // section number for Security Considerations
// Replace 'XXXX' in Section NN of [RFCXXXX] with the actual // Replace 'XXXX' in Section NN of [RFCXXXX] with the actual
// RFC number, and remove this note. // RFC number, and remove this note.
skipping to change at page 23, line 41 skipping to change at page 23, line 42
// and remove this note. // and remove this note.
// RFC Ed.: replace draft-ietf-netmod-yang-metadata with // RFC Ed.: replace draft-ietf-netmod-yang-metadata with
// the actual RFC reference for JSON Encoding of YANG Data, // the actual RFC reference for JSON Encoding of YANG Data,
// and remove this note. // and remove this note.
// RFC Ed.: replace 'XXXX' with the real RFC number, // RFC Ed.: replace 'XXXX' with the real RFC number,
// and remove this note // and remove this note
Encoding considerations: 8-bit Encoding considerations: 8-bit
The utf-8 charset is always used for this type.
Each conceptual YANG data node is encoded according to Each conceptual YANG data node is encoded according to
[draft-ietf-netmod-yang-json]. A data annotation is [draft-ietf-netmod-yang-json]. A data annotation is
encoded according to [draft-ietf-netmod-yang-metadata] encoded according to [draft-ietf-netmod-yang-metadata]
In addition, the "yang-patch" YANG Patch template found In addition, the "yang-patch" YANG Patch template found
in [RFCXXXX] defines the structure of a YANG Patch request. in [RFCXXXX] defines the structure of a YANG Patch request.
// RFC Ed.: replace 'NN' in Section NN of [RFCXXXX] with the // RFC Ed.: replace 'NN' in Section NN of [RFCXXXX] with the
// section number for Security Considerations // section number for Security Considerations
// Replace 'XXXX' in Section NN of [RFCXXXX] with the actual // Replace 'XXXX' in Section NN of [RFCXXXX] with the actual
// RFC number, and remove this note. // RFC number, and remove this note.
skipping to change at page 25, line 28 skipping to change at page 25, line 30
:yang-patch :yang-patch
urn:ietf:params:restconf:capability:yang-patch:1.0 urn:ietf:params:restconf:capability:yang-patch:1.0
5. Security Considerations 5. Security Considerations
The YANG Patch media type does not introduce any significant new The YANG Patch media type does not introduce any significant new
security threats, beyond what is described in security threats, beyond what is described in
[I-D.ietf-netconf-restconf]. This document defines edit processing [I-D.ietf-netconf-restconf]. This document defines edit processing
instructions for a variant of the PATCH method, as used within the instructions for a variant of the PATCH method, as used within the
RESTCONF protocol. RESTCONF protocol. Message integrity is provided by the RESTCONF
protocol. There is no additional capability to validate that a patch
has not been altered.
It may be possible to use YANG Patch with other protocols besides It may be possible to use YANG Patch with other protocols besides
RESTCONF, which is outside the scope of this document. RESTCONF, which is outside the scope of this document.
For RESTCONF, both the client and server MUST be authenticated, For RESTCONF, both the client and server MUST be authenticated,
according to section 2 of [I-D.ietf-netconf-restconf]. It is according to section 2 of [I-D.ietf-netconf-restconf]. It is
important for RESTCONF server implementations to carefully validate important for RESTCONF server implementations to carefully validate
all the edit request parameters in some manner. If the entire YANG all the edit request parameters in some manner. If the entire YANG
Patch request cannot be completed, then no configuration changes to Patch request cannot be completed, then no configuration changes to
the system are done. A PATCH request MUST be applied atomically, as the system are done. A PATCH request MUST be applied atomically, as
skipping to change at page 37, line 21 skipping to change at page 37, line 21
{ {
"ietf-yang-patch:yang-patch" : { "ietf-yang-patch:yang-patch" : {
"patch-id" : "add-songs-patch-2", "patch-id" : "add-songs-patch-2",
"edit" : [ "edit" : [
{ {
"edit-id" : "edit1", "edit-id" : "edit1",
"operation" : "create", "operation" : "create",
"target" : "/song=Rope", "target" : "/song=Rope",
"value" : { "value" : {
"song" : { "song" : [
"name" : "Rope", {
"location" : "/media/rope.mp3", "name" : "Rope",
"format" : "MP3", "location" : "/media/rope.mp3",
"length" : 259 "format" : "MP3",
} "length" : 259
}
]
} }
}, },
{ {
"edit-id" : "edit2", "edit-id" : "edit2",
"operation" : "create", "operation" : "create",
"target" : "/song=Dear%20Rosemary", "target" : "/song=Dear%20Rosemary",
"value" : { "value" : {
"song" : { "song" : [
"name" : "Dear Rosemary", {
"location" : "/media/dear_rosemary.mp3", "name" : "Dear Rosemary",
"format" : "MP3", "location" : "/media/dear_rosemary.mp3",
"length" : 269 "format" : "MP3",
} "length" : 269
}
]
} }
} }
] ]
} }
} }
Response from the RESTCONF server: Response from the RESTCONF server:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 23 Apr 2012 13:01:20 GMT Date: Mon, 23 Apr 2012 13:01:20 GMT
skipping to change at page 39, line 25 skipping to change at page 39, line 25
"patch-id" : "move-song-patch", "patch-id" : "move-song-patch",
"comment" : "Insert song 6 after song 5", "comment" : "Insert song 6 after song 5",
"edit" : [ "edit" : [
{ {
"edit-id" : "edit1", "edit-id" : "edit1",
"operation" : "insert", "operation" : "insert",
"target" : "/song=6", "target" : "/song=6",
"point" : "/song=5", "point" : "/song=5",
"where" : "after", "where" : "after",
"value" : { "value" : {
"example-jukebox:song" : { "example-jukebox:song" : [
"name" : "Dear Prudence", {
"location" : "/media/dear_prudence.mp3", "name" : "Dear Prudence",
"format" : "MP3", "location" : "/media/dear_prudence.mp3",
"length" : 236 "format" : "MP3",
} "length" : 236
}
]
} }
} }
] ]
} }
} }
Response from the RESTCONF server: Response from the RESTCONF server:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 23 Apr 2012 13:01:20 GMT Date: Mon, 23 Apr 2012 13:01:20 GMT
skipping to change at page 42, line 39 skipping to change at page 42, line 39
"A" : "test1", "A" : "test1",
"B" : 99 "B" : 99
} }
} }
}, },
{ {
"edit-id" : "edit3", "edit-id" : "edit3",
"operation" : "replace", "operation" : "replace",
"target" : "/baz:Z=2", "target" : "/baz:Z=2",
"value" : { "value" : {
"baz:Z" : { "baz:Z" : [
"C" : 2, {
"D" : 100, "C" : 2,
"E" : false "D" : 100,
} "E" : false
}
]
} }
} }
] ]
} }
} }
Response from the RESTCONF server: Response from the RESTCONF server:
HTTP/1.1 200 OK HTTP/1.1 200 OK
Date: Mon, 23 Apr 2012 13:02:20 GMT Date: Mon, 23 Apr 2012 13:02:20 GMT
 End of changes. 12 change blocks. 
29 lines changed or deleted 41 lines changed or added

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