[MDSAL-306] Binding V2 maps YANG enumerations to Java enums Created: 31/Jan/18 Updated: 16/Mar/19 Resolved: 16/Mar/19 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding V2 codegen, Binding V2 runtime |
| Affects Version/s: | Oxygen |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | preview-breakage, yang-1.1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Binding V2 maps enumerations to enums, which is a mistake from binding V1. YANG enumerations are really just a fancy name for string sets, as evidenced by 'enum "*"'. We cannot rely on sensible mapping of enum statement arguments and therefore should not be mapping enumerations to enums. Furthermore YANG 1.1 allows enumerations to be restricted to a subset of a base enumeration. Since Java enums cannot be subclassed, we cannot form a base/derived type relationship such that a derived enum instance is acceptable by a base enum receiver. |
| Comments |
| Comment by Robert Varga [ 16/Mar/19 ] |
|
Binding V2 is being removed in 4.0.0. |