◐ Shell
clean mode source ↗

schema: remove error after lyd_value_validate_dflt call by jeremie6wind · Pull Request #165 · CESNET/libyang-python

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>