[MDSAL-317] Generated enumerations should be implementing a yang-binding Enumeration interface Created: 09/Mar/18  Updated: 02/May/18  Resolved: 02/May/18

Status: Resolved
Project: mdsal
Component/s: Binding codegen
Affects Version/s: None
Fix Version/s: Fluorine

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by MDSAL-309 V1 codegen generates enum constants t... Resolved

 Description   

Generated enumerations have a getName() method which exposes the YANG-specified assigned name. Unfortunately this method is not captured in an interface contract, which leads to two things:

  • we need to generate javadoc over and over again
  • codec has to go back to mapping to recover them (or use reflection, ick)

Introduce Enumeration interface in yang-binding and have all enumerations implement it - that way we properly capture the constants  and the codec can reconstruct the mapping easily and just perform sanity checking if needed.



 Comments   
Comment by Robert Varga [ 10/Mar/18 ]

Fluorine: https://git.opendaylight.org/gerrit/69332

 

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