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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 2.0.10, 2.0.6.2
    • 2.0.9
    • None
    • None

      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;
          }
      

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

              Created:
              Updated:
              Resolved: