CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
296 stars 187 forks source link

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

Open som-1981 opened 1 year ago

som-1981 commented 1 year ago

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?

jktjkt commented 1 year ago

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>.