![]() |
libyang 3.13.5
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
|
Macros | |
| #define | LY_CTX_ALL_IMPLEMENTED 0x01 |
| #define | LY_CTX_BUILTIN_PLUGINS_ONLY 0x0800 |
| #define | LY_CTX_DISABLE_SEARCHDIR_CWD 0x10 |
| #define | LY_CTX_DISABLE_SEARCHDIRS 0x08 |
| #define | LY_CTX_ENABLE_IMP_FEATURES 0x0100 |
| #define | LY_CTX_EXPLICIT_COMPILE 0x80 |
| #define | LY_CTX_LEAFREF_EXTENDED 0x0200 |
| #define | LY_CTX_LEAFREF_LINKING 0x0400 |
| #define | LY_CTX_NO_YANGLIBRARY 0x04 |
| #define | LY_CTX_PREFER_SEARCHDIRS 0x20 |
| #define | LY_CTX_REF_IMPLEMENTED 0x02 |
| #define | LY_CTX_SET_PRIV_PARSED 0x40 |
Options to change context behavior.
| #define LY_CTX_ALL_IMPLEMENTED 0x01 |
| #define LY_CTX_BUILTIN_PLUGINS_ONLY 0x0800 |
By default, context uses all available plugins for types and extensions, both included and external. This options prevents all included plugins to be loaded except for built-in YANG types so all derived types will use these and for all purposes behave as the base type. The option can be used for cases when invalid data needs to be stored in YANG node values.
| #define LY_CTX_DISABLE_SEARCHDIR_CWD 0x10 |
| #define LY_CTX_DISABLE_SEARCHDIRS 0x08 |
Do not search for schemas in context's searchdirs neither in current working directory. It is entirely skipped and the only way to get schema data for imports or for ly_ctx_load_module() is to use the callbacks provided by caller via ly_ctx_set_module_imp_clb()
| #define LY_CTX_ENABLE_IMP_FEATURES 0x0100 |
| #define LY_CTX_EXPLICIT_COMPILE 0x80 |
If this flag is set, the compiled modules and their schema nodes are not automatically updated (compiled) on any context changes. In other words, they do not immediately take effect. To do that, call ly_ctx_compile(). Changes requiring compilation include adding new modules, changing their features, and implementing parsed-only modules. This option allows efficient compiled context creation without redundant recompilations.
| #define LY_CTX_LEAFREF_EXTENDED 0x0200 |
| #define LY_CTX_LEAFREF_LINKING 0x0400 |
Link valid leafref nodes with its target during validation if leafref node is not using 'require-instance false;'. It also enables usage of lyd_leafref_get_links and lyd_leafref_link_node_tree APIs.
| #define LY_CTX_NO_YANGLIBRARY 0x04 |
Do not internally implement ietf-yang-library module. The option causes that function ly_ctx_get_yanglib_data() does not work (returns LY_EINVAL) until the ietf-yang-library module is loaded manually. While any revision of this schema can be loaded with this option, note that the only revisions implemented by ly_ctx_get_yanglib_data() are 2016-06-21 and 2019-01-04. This option cannot be changed on existing context.
| #define LY_CTX_PREFER_SEARCHDIRS 0x20 |
| #define LY_CTX_REF_IMPLEMENTED 0x02 |
Implement all imported modules "referenced" from an implemented module. Normally, leafrefs, augment and deviation targets are implemented as specified by YANG 1.1. In addition to this, implement any modules of nodes referenced by when and must conditions and by any default values. Generally, only if all these modules are implemented, the explicitly implemented modules can be properly used and instantiated in data.
| #define LY_CTX_SET_PRIV_PARSED 0x40 |
For all compiled nodes, their private objects (lysc_node.priv) are used by libyang as a reference to the corresponding parsed node (lysp_node). The exception are "case" statements, which are omitted (shorthand), in that case the private objects are set to NULL. So if this option is set, the user must not change private objects. Setting this option by ly_ctx_set_options() may result in context recompilation. Resetting this option by ly_ctx_unset_options() cause that private objects will be set to NULL.