summaryrefslogtreecommitdiffstats
path: root/lib/mgmt_be_client.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-10-06 01:58:58 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-01-11 14:06:53 +0100
commit76e4eb84dd815ddee7d7e46bb5a2635bfe2501f5 (patch)
treeea6bd2707b0146d203feabcf2c820a0756f1dbfd /lib/mgmt_be_client.c
parentlib: split nb_operation into two types (diff)
downloadfrr-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/mgmt_be_client.c')
-rw-r--r--lib/mgmt_be_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c
index c3fb34a7a..dd2613f13 100644
--- a/lib/mgmt_be_client.c
+++ b/lib/mgmt_be_client.c
@@ -569,7 +569,7 @@ static int mgmt_be_update_setcfg_in_batch(struct mgmt_be_client *client_ctx,
== MGMTD__CFG_DATA_REQ_TYPE__DELETE_DATA)
cfg_chg->operation = NB_OP_DESTROY;
else
- cfg_chg->operation = NB_OP_CREATE;
+ cfg_chg->operation = NB_OP_MODIFY;
strlcpy(cfg_chg->xpath, cfg_req[index]->data->xpath,
sizeof(cfg_chg->xpath));