Implementing extension plugin parse callback.
◆ lyplg_ext_parse_clb
Callback for parsing extension instance substatements.
All known YANG substatements can easily be parsed using lyplg_ext_parse_extension_instance.
- Parameters
-
[in] | pctx | Parse context. |
[in,out] | ext | Parsed extension instance data. |
- Returns
- LY_SUCCESS on success.
-
LY_ENOT if the extension instance is not supported and should be removed.
-
LY_ERR error on error.
Definition at line 483 of file plugins_exts.h.
◆ lyplg_ext_parse_extension_instance()
LIBYANG_API_DECL LY_ERR lyplg_ext_parse_extension_instance |
( |
struct lysp_ctx * | pctx, |
|
|
struct lysp_ext_instance * | ext ) |
Parse substatements of an extension instance.
Uses standard libyang schema compiler to transform YANG statements into the parsed schema structures. The plugins are supposed to use this function when the extension instance's substatements can be parsed in a standard way.
- Parameters
-
[in] | pctx | Parse context. |
[in,out] | ext | Parsed extension instance with the prepared lysp_ext_instance.substmts array, which will be updated by storing the parsed data. |
- Returns
- LY_SUCCESS on success.
-
LY_ERR error on error.
◆ lyplg_ext_parse_get_cur_pmod()
LIBYANG_API_DECL const struct lysp_module * lyplg_ext_parse_get_cur_pmod |
( |
const struct lysp_ctx * | pctx | ) |
|
Get current parsed module from a parse context.
- Parameters
-
- Returns
- Current (local) parse mod.
◆ lyplg_ext_parse_log()
Log a message from an extension plugin using the parsed extension instance.
- Parameters
-
[in] | pctx | Parse context to use. |
[in] | ext | Parsed extensiopn instance. |
[in] | level | Log message level (error, warning, etc.) |
[in] | err_no | Error type code. |
[in] | format | Format string to print. |
[in] | ... | Format variable parameters. |