clibyang

What features can be used when installing sysrepo modules?


To install a sysrepo module via code you can use the call sr_install_module() with the following parameters:

API int
sr_install_module(sr_conn_ctx_t *conn,
                  const char *schema_path,
                  const char *search_dirs,
                  const char **features)

Which options can be used for features in here?


Solution

  • From the documentation of sr_install_module():

    [in] features Optional array of enabled features ended with NULL. Feature '*' enables them all.

    With this parameter one can specify which features of a given YANG module will be enabled upon importing it.

    For example if a YANG module has the features feature_A and feature_B, you can choose whether to enable none of them (NULL), or only feature_A (["feature_A", NULL]) or all of them (["*", NULL]), etc.