diff options
| author | Christian Hopps <chopps@labn.net> | 2025-02-11 07:12:06 +0000 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2025-02-14 18:14:30 +0000 |
| commit | d03ecf4562ef3ade6b7b83bf6c683c4741f395ba (patch) | |
| tree | c98c21a9d07c6168c6702c8d0787a51d9ee77bf7 /lib/northbound.h | |
| parent | baf4c1a78fe4cafdbb2cdbed030a31ea04a18c4a (diff) | |
lib: nb: call child destroy CBs when YANG container is deleted
Previously the code was only calling the child destroy callbacks if the target
deleted node was a non-presence container. We now add a flag to the callback
structure to instruct northbound to perform the rescursive delete for code that
wishes for this to happen.
- Fix wrong relative path lookup in keychain destroy callback
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound.h')
| -rw-r--r-- | lib/northbound.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/northbound.h b/lib/northbound.h index c31f007e70..7d38c63a86 100644 --- a/lib/northbound.h +++ b/lib/northbound.h @@ -386,6 +386,11 @@ struct nb_callbacks { int (*destroy)(struct nb_cb_destroy_args *args); /* + * Flags to control the how northbound callbacks are invoked. + */ + uint flags; + + /* * Configuration callback. * * A list entry or leaf-list entry has been moved. Only applicable when @@ -622,6 +627,12 @@ struct nb_callbacks { void (*cli_show_end)(struct vty *vty, const struct lyd_node *dnode); }; +/* + * Flag indicating the northbound should recurse destroy the children of this + * node when it is destroyed. + */ +#define F_NB_CB_DESTROY_RECURSE 0x01 + struct nb_dependency_callbacks { void (*get_dependant_xpath)(const struct lyd_node *dnode, char *xpath); void (*get_dependency_xpath)(const struct lyd_node *dnode, char *xpath); |
