diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-11-03 01:16:55 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-11-26 21:28:53 +0100 |
commit | 1a4bc045deac52e5c0b66d151dbbce8cc3675497 (patch) | |
tree | fa244f4c2f65da6f20bc8b44dd78315483e47bce /lib/lib_errors.c | |
parent | lib: do not subscribe to config changes on a state data tree (confd plugin) (diff) | |
download | frr-1a4bc045deac52e5c0b66d151dbbce8cc3675497.tar.xz frr-1a4bc045deac52e5c0b66d151dbbce8cc3675497.zip |
lib, tests: major rework in the operational-data callbacks
The northbound infrastructure for operational data was subpar compared
to the infrastructure for configuration data. This commit addresses most
of the existing problems, making it possible to write operational-data
callbacks for more complex YANG models.
Summary of the changes:
* Add support for nested YANG lists.
* Add support for leaf-lists.
* Add support for leafs of type "empty".
* Introduce the "show yang operational-data XPATH" command, and write an
unit test for it. The main purpose of this command is to make it
easier to test the operational-data northbound callbacks.
* Introduce the nb_oper_data_iterate() function, that can be used
to iterate over operational data. Make the CLI and sysrepo use this
function.
* Since ConfD has a very peculiar API, it can't reuse the
nb_oper_data_iterate() like the other northbound clients. In this
case, adapt the existing ConfD callbacks to support the new features
(and make some performance improvements in the process).
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/lib_errors.c')
-rw-r--r-- | lib/lib_errors.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/lib_errors.c b/lib/lib_errors.c index 71d1ec6e5..b1ed7d2f6 100644 --- a/lib/lib_errors.c +++ b/lib/lib_errors.c @@ -135,6 +135,12 @@ static struct log_ref ferr_lib_warn[] = { .suggestion = "This is a bug; please report it" }, { + .code = EC_LIB_NB_OPERATIONAL_DATA, + .title = "Failure to obtain operational data", + .description = "The northbound subsystem failed to obtain YANG-modeled operational data", + .suggestion = "This is a bug; please report it" + }, + { .code = EC_LIB_NB_TRANSACTION_CREATION_FAILED, .title = "Failure to create a configuration transaction", .description = "The northbound subsystem failed to create a configuration transaction", |