diff options
| author | Christian Hopps <chopps@labn.net> | 2024-10-07 03:23:31 +0000 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2024-10-07 03:32:44 +0000 |
| commit | e8648a0c72f89d4ee5abe271ba079df71c4c1418 (patch) | |
| tree | 87f1a475ee1ae1157354da6eedfc576605b36aeb /tools | |
| parent | 28a614d17b1061456c387d59ff12296e0830989d (diff) | |
lib: add flag to have libyang load internal ietf-yang-library module
Mgmtd makes use of libyang's internal ietf-yang-library module to add
support for said module to FRR management. Previously, mgmtd was loading
this module explicitly; however, that required that libyang's
`ietf-yang-library.yang` module definition file be co-located with FRR's
yang files so that it (and ietf-datastore.yang) would be found when
searched for by libyang using FRRs search path. This isn't always the
case depending on how the user compiles and installs libyang so mgmtd
was failing to run in some cases.
Instead of doing it the above way we simply tell libyang to load it's
internal version of ietf-yang-library when we initialize the libyang
context.
This required adding a boolean to a couple of the init functions which
is why so many files are touched (although all the changes are minimal).
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gen_northbound_callbacks.c | 2 | ||||
| -rw-r--r-- | tools/gen_yang_deviations.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/gen_northbound_callbacks.c b/tools/gen_northbound_callbacks.c index a879811363..046dc9e99e 100644 --- a/tools/gen_northbound_callbacks.c +++ b/tools/gen_northbound_callbacks.c @@ -448,7 +448,7 @@ int main(int argc, char *argv[]) if (argc != 1) usage(EXIT_FAILURE); - yang_init(false, true); + yang_init(false, true, false); if (search_path) ly_ctx_set_searchdir(ly_native_ctx, search_path); diff --git a/tools/gen_yang_deviations.c b/tools/gen_yang_deviations.c index 251643c69e..c2e7fd91c6 100644 --- a/tools/gen_yang_deviations.c +++ b/tools/gen_yang_deviations.c @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) if (argc != 1) usage(EXIT_FAILURE); - yang_init(false, false); + yang_init(false, false, false); /* Load YANG module. */ module = yang_module_load(argv[0], NULL); |
