summaryrefslogtreecommitdiff
path: root/lib/northbound.h
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2024-01-18 04:17:35 +0000
committerChristian Hopps <chopps@labn.net>2024-01-19 15:27:24 +0000
commit9e34d817fcccd29115c2fef0c9199cca24b631fd (patch)
tree94858491e75cc5019fa149eca76cbf51e65a8c99 /lib/northbound.h
parentf05a4e3b577b50f20b85ae95e53222c133bc7b1f (diff)
lib: better conditionalize leaf-list predicate xpath addition
If we're in the backend we already have the predicate added by mgmtd -- don't add it again. Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound.h')
-rw-r--r--lib/northbound.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/northbound.h b/lib/northbound.h
index 4f9ab565d9..482a055965 100644
--- a/lib/northbound.h
+++ b/lib/northbound.h
@@ -950,6 +950,9 @@ extern bool nb_is_operation_allowed(struct nb_node *nb_node,
* xpath
* XPath of the configuration node being edited.
*
+ * in_backend
+ * Specify whether the changes are being applied in the backend or not.
+ *
* previous
* Previous value of the configuration node. Should be used only when the
* operation is NB_OP_MOVE, otherwise this parameter is ignored.
@@ -964,7 +967,7 @@ extern bool nb_is_operation_allowed(struct nb_node *nb_node,
extern int nb_candidate_edit(struct nb_config *candidate,
const struct nb_node *nb_node,
enum nb_operation operation, const char *xpath,
- const struct yang_data *previous,
+ bool in_backend, const struct yang_data *previous,
const struct yang_data *data);
/*
@@ -1009,6 +1012,9 @@ extern bool nb_candidate_needs_update(const struct nb_config *candidate);
* xpath_base
* Base xpath for config.
*
+ * in_backend
+ * Specify whether the changes are being applied in the backend or not.
+ *
* err_buf
* Buffer to store human-readable error message in case of error.
*
@@ -1018,10 +1024,12 @@ extern bool nb_candidate_needs_update(const struct nb_config *candidate);
* error
* TRUE on error, FALSE on success
*/
-extern void nb_candidate_edit_config_changes(
- struct nb_config *candidate_config, struct nb_cfg_change cfg_changes[],
- size_t num_cfg_changes, const char *xpath_base, char *err_buf,
- int err_bufsize, bool *error);
+extern void nb_candidate_edit_config_changes(struct nb_config *candidate_config,
+ struct nb_cfg_change cfg_changes[],
+ size_t num_cfg_changes,
+ const char *xpath_base,
+ bool in_backend, char *err_buf,
+ int err_bufsize, bool *error);
/*
* Delete candidate configuration changes.