Details
-
Improvement
-
Status: Resolved
-
Medium
-
Resolution: Done
-
None
-
None
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.
Attachments
Issue Links
- is blocked by
-
MDSAL-309 V1 codegen generates enum constants that are not valid Java identifiers
-
- Resolved
-
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 69332,11 | Add Enumeration yang-binding interface | master | mdsal | Status: MERGED | +2 | +1 |
| 69335,1 | Add Enumeration yang-binding interface | stable/oxygen | mdsal | Status: ABANDONED | 0 | -1 |
| 69337,1 | Add Enumeration yang-binding interface | stable/nitrogen | mdsal | Status: ABANDONED | 0 | 0 |
| 69339,1 | Add Enumeration yang-binding interface | stable/carbon | mdsal | Status: ABANDONED | 0 | 0 |
| 69351,29 | Improve EnumerationCodec | master | mdsal | Status: MERGED | +2 | +1 |