[YANGTOOLS-957] YANG parser does not complain about list without key Created: 27/Feb/19 Updated: 14/Jan/20 Resolved: 14/Jan/20 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | 2.0.10 |
| Fix Version/s: | 3.0.8, 4.0.5, 2.1.16 |
| Type: | Bug | Priority: | Low |
| Reporter: | Peter Verthez | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
We're using version 2.0.11. The parser does not give an error if the YANG model contains a (config) list without key, although this is not allowed according to the RFC. pyang does give the following error on the attached model: example.yang:7: error: the list needs at least one key |
| Comments |
| Comment by Robert Varga [ 08/Oct/19 ] |
|
This will need to be an optional feature, as we can deal with config=true unkeyed lists just fine. This will require a post-assembly check of the datatree to check for presence of such lists. |
| Comment by Robert Varga [ 08/Jan/20 ] |
|
The message is triggered for lists defined in a grouping, which is rather unfortunate (and spammy). A new fix will need to be delivered. |