Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: add flag to have libyang load internal ietf-yang-library module #17015

Conversation

choppsv1
Copy link
Contributor

@choppsv1 choppsv1 commented Oct 7, 2024

Mgmtd makes use of libyang's internal ietf-yang-library module to add support for said module to FRR management. Previously, ietf-yang-library was loading this module explicitly; however, that required that libyang's ietf-yang-library.yang module definition file be co-located with FRR's so that it (and ietf-datastore.yang) would be found when searched for by libyang. This isn't always the case depending on how the user compiles and installs libyang so mgmtd was failing to run in these cases.

Instead of doing it that 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).

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 <[email protected]>
@choppsv1 choppsv1 force-pushed the chopps/load-internal-ietf-yang-library branch from 2e5b762 to e8648a0 Compare October 7, 2024 03:34
@idryzhov idryzhov merged commit c10e4d3 into FRRouting:master Oct 7, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants