summaryrefslogtreecommitdiff
path: root/lib/northbound.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-11-13 20:36:48 -0200
committerRenato Westphal <renato@opensourcerouting.org>2018-11-26 17:38:08 -0200
commit544ca69a5cc7da81ad2f9f72110b34ee03b7cc44 (patch)
tree84daae9c8863af8bffae0ef910fbcc5f6f5f65f6 /lib/northbound.h
parente0ccfad220d80c1d02b327fd0ee24faf6a8d2bd4 (diff)
lib: add support for YANG lists with mixed config and state data
A YANG list that contains both configuration and state data must have the following callbacks: create(), delete(), get_next(), get_keys() and lookup_entry(). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/northbound.h')
-rw-r--r--lib/northbound.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/northbound.h b/lib/northbound.h
index 8ab6662ecc..68bce5b398 100644
--- a/lib/northbound.h
+++ b/lib/northbound.h
@@ -349,11 +349,16 @@ struct nb_node {
/* Pointer to the nearest parent list, if any. */
struct nb_node *parent_list;
+ /* Flags. */
+ uint8_t flags;
+
#ifdef HAVE_CONFD
/* ConfD hash value corresponding to this YANG path. */
int confd_hash;
#endif
};
+/* The YANG container or list contains only config data. */
+#define F_NB_NODE_CONFIG_ONLY 0x01
struct frr_yang_module_info {
/* YANG module name. */
@@ -436,6 +441,16 @@ extern int debug_northbound;
extern struct nb_config *running_config;
/*
+ * Create a northbound node for all YANG schema nodes.
+ */
+void nb_nodes_create(void);
+
+/*
+ * Delete all northbound nodes from all YANG schema nodes.
+ */
+void nb_nodes_delete(void);
+
+/*
* Find the northbound node corresponding to a YANG data path.
*
* xpath