]> git.puffer.fish Git - mirror/frr.git/commit
lib: yang: use common yang_ctx_new_setup()
authorDavid Lamparter <equinox@diac24.net>
Mon, 4 Feb 2019 21:56:50 +0000 (22:56 +0100)
committerDavid Lamparter <equinox@diac24.net>
Tue, 19 Feb 2019 20:41:39 +0000 (21:41 +0100)
commit591f57cff3e035439dff7c39a9bd688892fa5363
treee52873cf2ad95b7cf029809244991dac48ad8e82
parent3ec9556728c7fe17bb1c47e62abf75bbff29502f
lib: yang: use common yang_ctx_new_setup()

After creating a libyang context, we need to hook up our callback to use
embedded built-in modules.  I hadn't added this to the yang translator
code.

Also, ly_ctx_new fails if the search directory doesn't exist.  Since
that's not a hard error for us, work around that and ignore inaccessible
YANG_MODELS_DIR.  (This is needed for snap packages.)

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/yang.c
lib/yang.h
lib/yang_translator.c