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

Codegen fails when a grouping contains an enumeration leaf

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Highest
    • Resolution: Done
    • None
    • Fluorine
    • Binding codegen
    • None

    Description

      This showed up in https://git.opendaylight.org/gerrit/74322 and boils down to:

      grouping special-next-hop-grouping {
          leaf special-next-hop {
              type enumeration {
                  enum blackhole {
                      description "Silently discard the packet.";
                  }
              }
          }
      }
      
      choice next-hop-options {
          case special-next-hop {
              uses special-next-hop-grouping;
          }
      }

      SpecialNextHopGrouping generates an inner enumeration class named SpecialNextHop. The case statement leads to SpecialNextHopBuilder being generated, which contains an inner SpecialNextHopImpl implementing SpecialNextHopGrouping.

      Since SpecialNextHopImpl implements SpecialNextHopGrouping, SpecialNextHop enumeration shadows the case statement, leading to mismatch in types when SpecialNextHop is used with a short name.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: