libyang icon indicating copy to clipboard operation
libyang copied to clipboard

doc: `lyd_parse_op` has special requirements when parsing notifications

Open jktjkt opened this issue 3 months ago • 1 comments

As confirmed by Michal, the parsing code will try to read the notifications module, if it is available, or if the parsed data from the ietf-yang-types module are not available. As a result, a context which has not loaded the notifications module and which was not created with LY_CTX_SET_PRIV_PARSE will return an error when parsing notifications.

jktjkt avatar Oct 30 '25 14:10 jktjkt

That is not accurate. Normal context will work fine because it keeps the parsed modules and nothing else is needed. It is specific to sysrepo that it frees the parsed modules to save some memory except when the LY_CTX_SET_PRIV_PARSED flag is used when the modules are not freed (but is mostly a side-effect of the flag).

michalvasko avatar Oct 30 '25 14:10 michalvasko