[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: |
|
||||||||
| 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:
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
|