Commit dc3ac55
committed
lyd_validate_minmax(): always return a valid data path
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.
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 03e294d commit dc3ac55
1 file changed
+22
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
| 1145 | + | |
| 1146 | + | |
1145 | 1147 | | |
| 1148 | + | |
1146 | 1149 | | |
1147 | 1150 | | |
1148 | 1151 | | |
1149 | 1152 | | |
| 1153 | + | |
1150 | 1154 | | |
1151 | 1155 | | |
1152 | 1156 | | |
| |||
1182 | 1186 | | |
1183 | 1187 | | |
1184 | 1188 | | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
1191 | 1198 | | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
1196 | 1204 | | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
1208 | 1208 | | |
1209 | 1209 | | |
1210 | | - | |
| 1210 | + | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | 1213 | | |
| |||
0 commit comments