Skip to content

Conversation

@jeremie6wind
Copy link
Contributor

libyang returns the realtype field when the store callback return code is LY_SUCCESS and LY_EINCOMPLETE.
Don't raise an error when lyd_value_validate_dflt returns LY_EINCOMPLETE. The function can then use the val_type_cdata field.

Link: https://github.com/CESNET/libyang/blob/master/src/tree_data_common.c#L682

@jeremie6wind jeremie6wind force-pushed the master branch 2 times, most recently from 5dbce04 to 877142b Compare January 15, 2026 08:09
libyang returns the realtype field when the store callback return code
is LY_SUCCESS and LY_EINCOMPLETE.
Don't raise an error when lyd_value_validate_dflt returns
LY_EINCOMPLETE. The function can then use the val_type_cdata field.
Add a leafref with a default value to yolo-nodetypes.yang.
In this case, lyd_value_validate_dflt returns LY_EINCOMPLETE.
In test_schema.py, check that the default function returns a correct str
value.

Link: https://github.com/CESNET/libyang/blob/master/src/tree_data_common.c#L682
Signed-off-by: Jeremie Leska <jeremie.leska@6wind.com>
@samuel-gauthier samuel-gauthier merged commit d3a2f35 into CESNET:master Jan 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants