mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 15:30:02 +00:00

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>
30 lines
878 B
Plaintext
30 lines
878 B
Plaintext
SUFFIXES += .yang .yang.c .yin .yin.c
|
|
EXTRA_DIST += yang/embedmodel.py
|
|
|
|
.yang.yang.c:
|
|
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/yang/embedmodel.py $^ $@
|
|
.yin.yin.c:
|
|
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/yang/embedmodel.py $^ $@
|
|
|
|
# use .yang.c files like this:
|
|
#
|
|
# ripd_ripd_SOURCES = \
|
|
# ...
|
|
# nodist_ripd_ripd_SOURCES = \
|
|
# yang/frr-ripd.yang.c \
|
|
# # end
|
|
#
|
|
# Note that putting the .yang.c file into a static library.a will NOT work
|
|
# because the entire file is "optimized out" since it does not contain any
|
|
# global symbols :(. Just put it in the daemon. Dynamic libraries.so work
|
|
# without problems, as seen in libfrr.
|
|
|
|
dist_yangmodels_DATA += yang/frr-module-translator.yang
|
|
dist_yangmodels_DATA += yang/frr-test-module.yang
|
|
dist_yangmodels_DATA += yang/frr-interface.yang
|
|
dist_yangmodels_DATA += yang/frr-route-types.yang
|
|
|
|
if RIPD
|
|
dist_yangmodels_DATA += yang/frr-ripd.yang
|
|
endif
|