From 1a4bc045deac52e5c0b66d151dbbce8cc3675497 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Fri, 2 Nov 2018 22:16:55 -0200 Subject: 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 --- lib/lib_errors.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/lib_errors.h') diff --git a/lib/lib_errors.h b/lib/lib_errors.h index 38c75f913e..5534edbd8d 100644 --- a/lib/lib_errors.h +++ b/lib/lib_errors.h @@ -62,6 +62,7 @@ enum lib_log_refs { EC_LIB_NB_CB_RPC, EC_LIB_NB_CANDIDATE_INVALID, EC_LIB_NB_CANDIDATE_EDIT_ERROR, + EC_LIB_NB_OPERATIONAL_DATA, EC_LIB_NB_TRANSACTION_CREATION_FAILED, EC_LIB_NB_TRANSACTION_RECORD_FAILED, EC_LIB_LIBYANG, -- cgit v1.2.3