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

Refining leaf-list with "default"

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 6.0.8, 7.0.5
    • parser
    • None

    Description

      I have modeled my yang structure with a grouping, which has a leaf-list. When this grouping is used, I have refined the leaf-list to set a default value. However the yangtools gives an error

      "can not perform refine of 'DEFAULT' for the target 'LEAF_LIST'. "

      Pyang works fine with no error/warning.

      I have looked at the RFC https://datatracker.ietf.org/doc/html/rfc7950#section-7.13.2 and it seems supported.

      Can you please help with this.

       

      grouping abcded {
        container xyz {
          description "blah";
          leaf zyx { type boolean; description "blah blah..."; }
          leaf pqr { type string; description "yada yada..."; }
          leaf rst { type boolean; description "more blah..."; }
          leaf-list abc { type abc-type; description "more yada..."; }
        }
      }
      uses somewhere:abcded {
        refine "xyz/abcd" { default "all"; }
      }
      
      typedef abc-type {
        description "Used to indicate the types";
        type enumeration {
          enum one { description "first type"; value 1; }
          enum two { description "second type"; value 2; }
          enum three { description "third type"; value 3; }
          enum four { description "fourth type; value 4; }
          enum all { description "Reuse all possible options"; value 99; }
        }
      }
      

       

      Attachments

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

        Activity

          People

            rovarga Robert Varga
            b95quare Balagangadhar Bathula
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: