Commit 877142b
committed
schema: remove error after lyd_value_validate_dflt calls
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 <[email protected]>1 parent 0a4b09f commit 877142b
File tree
3 files changed
+12
-2
lines changed- libyang
- tests
- yang/yolo
3 files changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1545 | 1545 | | |
1546 | 1546 | | |
1547 | 1547 | | |
1548 | | - | |
| 1548 | + | |
1549 | 1549 | | |
1550 | 1550 | | |
1551 | 1551 | | |
| |||
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
1622 | | - | |
| 1622 | + | |
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
735 | 738 | | |
736 | 739 | | |
737 | 740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
0 commit comments