![]() |
libyang
1.0.101
YANG data modeling language library
|
Schema parser allows to read schema from a specific format. libyang supports the following schema formats:
YANG
Basic YANG schemas format described in RFC 6020 and RFC 7951 (so both YANG 1.0 and YANG 1.1 versions are supported).
YIN
Alternative XML-based format to YANG - YANG Independent Notation. The details can be found in RFC 6020 and RFC 7951.
When the context is created, it already contains the following schemas, which are implemented internally by libyang:
The yang
schema is the libyang's internal module to provide namespace and definitions of for various YANG attributes described in RFC 7951 (such as insert
attribute for edit-config's data).
Other schemas can be added to the context manually as described in context page by the functions listed below. Besides the schema parser functions, it is also possible to use ly_ctx_load_module() which tries to find the required schema automatically - using ly_module_imp_clb or automatic search in working directory and in the context's searchpath.