summaryrefslogtreecommitdiff
path: root/lib/northbound_sysrepo.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-01-23 02:09:25 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-01-23 12:33:39 +0200
commita594cda8cec0a67d59ee28d5fb59e958611370c9 (patch)
treec3860517b2672f8785569bf8a10a85ca3a117739 /lib/northbound_sysrepo.c
parent22d1ad786f6961bf4f685599b5fb16a84b802346 (diff)
lib: remove leaf-list xpath hack from northbound
Currently, when editing a leaf-list, `nb_candidate_edit` expects to receive it's xpath without a predicate and the value in a separate argument, and then creates the full xpath. This hack is complicated, because it depends on the operation and on the caller being a backend or not. Instead, let's require to always include the predicate in a leaf-list xpath. Update all the usages in the code accordingly. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/northbound_sysrepo.c')
-rw-r--r--lib/northbound_sysrepo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/northbound_sysrepo.c b/lib/northbound_sysrepo.c
index 050477af91..198d96e381 100644
--- a/lib/northbound_sysrepo.c
+++ b/lib/northbound_sysrepo.c
@@ -219,7 +219,7 @@ static int frr_sr_process_change(struct nb_config *candidate,
sr_val_to_buff(sr_data, value_str, sizeof(value_str));
data = yang_data_new(xpath, value_str);
- ret = nb_candidate_edit(candidate, nb_node, nb_op, xpath, false, NULL, data);
+ ret = nb_candidate_edit(candidate, nb_node, nb_op, xpath, NULL, data);
yang_data_free(data);
if (ret != NB_OK) {
flog_warn(