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

LeafRefValidatation can't find target node for relative refs defined in external grouping

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • 2.0.9
    • 2.0.10, 2.0.6.2
    • None
    • None

    Description

      LeafRefPatch is built using namespace of the module which contains leafref.
      Such approach probably originates from --YANGTOOLS-749--, but fails with

      org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefDataValidationFailedException:
      Invalid leafref value
      [...]
      allowed values []
      

      for uscase as simple as:

      bar.yang:

          grouping grouping-with-list {
              list list-in-grouping {
                  key "name";
                  leaf name {
                      type leafref {
                          path "../container-in-list/name";
                      }
                  }
                  container container-in-list {
                      leaf name {
                          type string;
                      }
                  }
              }
          }
      

      foo.yang:

          container foo-top {
              uses bar:grouping-with-list;
          }
      

      Attachments

        Issue Links

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

          Activity

            People

              mgradzki Marek Gradzki
              mgradzki Marek Gradzki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: