Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-317

Generated enumerations should be implementing a yang-binding Enumeration interface

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • Fluorine
    • None
    • Binding codegen
    • None

      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.

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: