Commit 6eb7963
committed
lyd_validate_minmax(): always return a valid data path if available
The current code never returns a data path, only a schema path for
failures where the 'min' value is not reached. Integrators may need
to obtain both a LIST key as well as the leaf name to present proper
error messages.
When we don't have a full valid data path, the code now will return
the parent's data path with the current schema node name appended.
Only if there is no parent (not a realworld issue, but the test
system does this) will the schema path be used.
This fix was inspired by porting of SONiC's sonic-mgmt-common which
is utilizing this feature which previously worked with libyang1.
Signed-off-by: Brad House <[email protected]>1 parent 02126d7 commit 6eb7963
1 file changed
+26
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
| 1146 | + | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | 1149 | | |
| |||
1182 | 1183 | | |
1183 | 1184 | | |
1184 | 1185 | | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1191 | 1201 | | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
1196 | 1209 | | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
| 1210 | + | |
| 1211 | + | |
1208 | 1212 | | |
1209 | 1213 | | |
1210 | | - | |
| 1214 | + | |
1211 | 1215 | | |
1212 | 1216 | | |
1213 | 1217 | | |
| |||
0 commit comments