-
Notifications
You must be signed in to change notification settings - Fork 320
Open
Labels
is:questionIssue is actually a question.Issue is actually a question.
Description
Hi,
Used versions:
libyang-3.13.6
sysrepo-3.7.11
I'm using lyd_parse_data_path(const struct ly_ctx *ctx, const char *path, LYD_FORMAT format, uint32_t parse_options, uint32_t validate_options, struct lyd_node **tree) to parse an xml file and validate that its content is conformed to the yang data tree.
I have something like this:
sr_connect(0, &sr_conn);
struct ly_ctx* ctx = sr_acquire_context(sr_conn);
lyd_parse_data_path(ctx, my_xml_file, LYD_XML, parse_options=**LYD_PARSE_STRICT**, LYD_VALIDATE_MULTI_ERROR, &output);
But my need is also to return an error when there's a module in the xml that is not installed in sysrepo.
I'm using LYD_PARSE_STRICT but it doesn't work for this type of verification. Is there a way to verify this?
Thank you for your reply!
Metadata
Metadata
Assignees
Labels
is:questionIssue is actually a question.Issue is actually a question.