netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

libnetconf2 does not support delete or remove operation for edit-config

Open som-1981 opened this issue 2 years ago • 1 comments

The libnetconf2 does not support delete or remove operation for edit-config as per the rfc 6241 section 7.2.

enum | NC_RPC_EDIT_DFLTOP { NC_RPC_EDIT_DFLTOP_UNKNOWN = 0, NC_RPC_EDIT_DFLTOP_MERGE, NC_RPC_EDIT_DFLTOP_REPLACE, NC_RPC_EDIT_DFLTOP_NONE }

By default, it is a merge operation. Can you please let me know why delete or remove is not supported?

som-1981 avatar Jul 24 '23 04:07 som-1981

The enum that you've showed describes the default-operation parameter (end of page 38 of the RFC), which is encoded as an XML attribute of the enclosing <edit-config>.

What you probably have in mind is the operation parameter, but that one is not encoded as an attribute of the <edit-config> XML element, but rather as an XML attribute of the XML children of <config>.

jktjkt avatar Jul 24 '23 07:07 jktjkt