diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2023-10-06 01:58:58 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-11 14:06:53 +0100 |
commit | 76e4eb84dd815ddee7d7e46bb5a2635bfe2501f5 (patch) | |
tree | ea6bd2707b0146d203feabcf2c820a0756f1dbfd /lib/vty.c | |
parent | lib: split nb_operation into two types (diff) | |
download | frr-76e4eb84dd815ddee7d7e46bb5a2635bfe2501f5.tar.xz frr-76e4eb84dd815ddee7d7e46bb5a2635bfe2501f5.zip |
mgmtd, lib: implement CREATE_EXCL operation
Currently, there's no difference between CREATE and MODIFY operations.
To be compatible with NETCONF/RESTCONF, add new CREATE_EXCL operation
that throws an error if the configuration data already exists.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/vty.c')
-rw-r--r-- | lib/vty.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4001,6 +4001,11 @@ int vty_mgmt_send_config_data(struct vty *vty, const char *xpath_base, MGMTD__CFG_DATA_REQ_TYPE__DELETE_DATA; break; + case NB_OP_CREATE_EXCL: + cfg_req[indx].req_type = + MGMTD__CFG_DATA_REQ_TYPE__CREATE_DATA; + break; + case NB_OP_CREATE: case NB_OP_MODIFY: case NB_OP_MOVE: |