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

Binding V2 maps YANG enumerations to Java enums

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: