cisco IOS XE — RESTCONF YANG-Patch Support

A YANG-Patch is identified by a unique patch-id. A patch is an ordered collection of edits and each edit is identified by an edit-id. It has an edit operation ("create", "delete", "insert", "merge", "move", "replace", or "remove") that is applied to the target resource. To verify if the RESTCONF YANG-Patch is supported issue the following RESTCONF Get request: curl -k -s -u admin:DMIdmi1!

--location-trusted "https://10.1.1.1/restconf/data/ietf-restconf-monitoring:restconf-state/capabilities" -X GET xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring" xmlns:rcmon="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"> urn:ietf:params:restconf:capability:defaults:1.0?basic-mode=explicit urn:ietf:params:restconf:capability:depth:1.0 urn:ietf:params:restconf:capability:fields:1.0 urn:ietf:params:restconf:capability:with-defaults:1.0 urn:ietf:params:restconf:capability:filter:1.0 urn:ietf:params:restconf:capability:replay:1.0 urn:ietf:params:restconf:capability:yang-patch:1.0 http://tail-f.com/ns/restconf/collection/1.0 http://tail-f.com/ns/restconf/query-api/1.0 This section provides a few RESTCONF YANG-Patch examples.

Add Resource Error While trying to edit a file, the first edit already exists and an error is reported. The rest of the edits are not attempted because the first edit failed. XML encoding is used in this example The following example show an add resource request from the RESTCONF client: xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-patch"> add-hostname-patch edit1 create /hostname xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">Cat9K-test edit2 create /interface/Loopback=1 xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"> 1 The following examples shows a JSON response from the RESTCONF server: RESTCONF Protocol RESTCONF YANG-Patch Support RESTCONF Protocol 6