Options to change context behavior.
#define LY_CTX_ALL_IMPLEMENTED 0x01 |
All the imported modules of the schema being parsed are implemented.
Definition at line 161 of file context.h.
#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.
Definition at line 238 of file context.h.
#define LY_CTX_DISABLE_SEARCHDIR_CWD 0x10 |
Do not automatically search for schemas in current working directory, which is by default searched automatically (despite not recursively).
Definition at line 191 of file context.h.
#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()
Definition at line 184 of file context.h.
#define LY_CTX_ENABLE_IMP_FEATURES 0x0100 |
By default, all features of newly implemented imported modules of a module that is being loaded are disabled. With this flag they all become enabled.
Definition at line 223 of file context.h.
#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.
Definition at line 212 of file context.h.
#define LY_CTX_LEAFREF_EXTENDED 0x0200 |
By default, path attribute of leafref accepts only path as defined in RFC 7950. By using this option, the path attribute will also allow using XPath functions as deref()
Definition at line 228 of file context.h.
#define LY_CTX_LEAFREF_LINKING 0x0400 |
#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.
Definition at line 173 of file context.h.
#define LY_CTX_PREFER_SEARCHDIRS 0x20 |
When searching for schema, prefer searchdirs instead of user callback.
Definition at line 196 of file context.h.
#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.
Definition at line 162 of file context.h.
#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.
Definition at line 197 of file context.h.