[YANGTOOLS-910] RFC7950Reactors.defaultReactor can not build the yang file with content "yang-version 1.0" Created: 17/Oct/18 Updated: 17/Oct/18 Resolved: 17/Oct/18 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | 2.1.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | High |
| Reporter: | Liu Hui | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
In my project, I'm trying to parse the yang files with yangtools parser, and RFC7950Reactors.defaultReactor is chosen as below:
Then I test the yang files in compatibleDir, if the yang file is specified with "yang-version 1.0", I'll get the Exception below:
And if I remove the content "yang-version 1.0" or replace it with "yang-version 1.1", I'll get the yang file parsed correctly, no exceptions occured. Can anyone help with the issue I encountered.Thacks.
|
| Comments |
| Comment by Robert Varga [ 17/Oct/18 ] |
|
"1.0" is not a valid yang-version string, as per https://tools.ietf.org/html/rfc6020#section-7.1.2 and https://tools.ietf.org/html/rfc7950#section-7.1.2
|
| Comment by Liu Hui [ 17/Oct/18 ] |
|
Thank you rovarga, I changed "yang-version 1.0" to "yang-version 1" , same exception occured, we have some yang files contains the string "yang-version 1" , how to avoid this exception?
|
| Comment by Robert Varga [ 17/Oct/18 ] |
|
I cannot diagnose this without a full stack trace, including the cause stack. Given the problem disappears with YANG 1.1, I assume the model is using a YANG 1.1-only construct. |
| Comment by Liu Hui [ 17/Oct/18 ] |
|
Thanks rovarga, Maybe you're right, I'll test those files later. |