Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-655

Error parsing enums with unknown substatements inside its values

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Do
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 6561

    Description

      Please consider the following YANG excerpt:

      grouping gigabit-eth-mdix {
      leaf mdix {

      tailf:info "Configure MDIX mode";
      mandatory true;
      tailf:cli-suppress-no;

      type enumeration {
      enum normal

      { tailf:info "Set interface MDIX to Normal mode"; }

      enum xover

      { tailf:info "Set interface MDIX to X-Over mode"; }

      enum auto

      { tailf:info "Set interface MDIX to Automatic Detection mode"; }

      }
      }
      }

      When debugging what was being parsed, I encountered this problem:

      All "tailf" statements (which are considered Unknown Statements) were at at the Leaf level. Although each enum value have a property for unknown statements aswell, they are all empty as you can see in the attached file.

      I would expect that for this example, only

      tailf:info "Configure MDIX mode";
      tailf:cli-suppress-no;

      should be considered unknown statements of "leaf mdix". The rest, should be inside the collection of unkown statements of its repective enum value IMO.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            patrickthiagobard@gmail.com Patrick Thiago Bard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: