[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:
Relates
relates to MDSAL-326 Binding V1 maps identities to java.la... Resolved

 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.

Generated at Wed Feb 07 20:09:28 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.