Sysrepo sr_install_module() not considering search_dirs parameter

28 views Asked by At

I'm trying to install a sysrepo module with sr_install_module()

When calling the following code though, the function seems to dismiss the search dirs parameter as the call fails with the error libyang[0]: Failed to open file "iana-if-type.yang" (No such file or directory).

#include "sysrepo.h"
#include "libyang/libyang.h"

sr_conn_ctx_t *srContext;
sr_connect(SR_CONN_CACHE_RUNNING, &srContext);


char *moduleName = "ietf-interfaces.yang";
char *searchDir = "/path/to/dir"
sr_install_module(srContext, moduleName, searchDir, NULL);

The module exists in "/path/to/dir" but is not found by the call. If I instead use "/path/to/dir/ietf-interfaces.yang as the value of moduleName the module is found correctly. What am I missing here?

0

There are 0 answers