]> git.proxmox.com Git - mirror_frr.git/commit
lib, tools: silence harmless warnings in the northbound tools
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 3 Apr 2020 22:43:02 +0000 (19:43 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 4 Apr 2020 01:34:55 +0000 (22:34 -0300)
commitb90204a8e99808378621e50f8e586e6eabb30b76
tree1c9b73b4eabb8de2257c409dda4640738faf89c9
parent5f37f5304f337a7fe5e0e80afaa85a108b8bc809
lib, tools: silence harmless warnings in the northbound tools

Our two northbound tools don't have embedded YANG modules like the
other FRR binaries. As such, ly_ctx_set_module_imp_clb() shouldn't be
called when the YANG subsystem it being initialized by a northbound
tool. To make that possible, add a new "embedded_modules" parameter
to the yang_init() function to control whether libyang should look
for embedded modules or not.

With this fix, "gen_northbound_callbacks" and "gen_yang_deviations"
won't emit "YANG model X not embedded, trying external file"
warnings anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
12 files changed:
lib/grammar_sandbox_main.c
lib/libfrr.c
lib/yang.c
lib/yang.h
lib/yang_translator.c
tests/bgpd/test_peer_attr.c
tests/helpers/c/main.c
tests/lib/cli/common_cli.c
tests/lib/cli/test_commands.c
tests/lib/northbound/test_oper_data.c
tools/gen_northbound_callbacks.c
tools/gen_yang_deviations.c