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

Unable to refine anyxml node from imported model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Medium Medium
    • 6.0.0, 4.0.13, 5.0.7
    • 3.0.4
    • parser
    • None

      Given 2 yang models:

      a.yang

      module a {
          namespace "urn:opendaylight:a";
          prefix "a";
          revision 2019-11-24 {
              description "Initial revision";
          }
          grouping arg-path {
              anyxml path {
                  description "ABC";
                  mandatory true;
              }
          }
      }
      

      b.yang

      module b {
          namespace "urn:opendaylight:b";
          prefix "b";    
          import a { prefix "a"; }
          revision 2019-11-24 {
              description "Initial revision";
          }
          
          rpc rpc1 {
              input {
                  uses a:arg-path { refine path { mandatory false; } }
              }
          }
      }
      

      Second model can't be compiled:

       

      [ERROR] Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:3.0.4:generate-sources (binding) on project jsonrpc-test-model: Failed to process reactor ProcessorModuleReactor{sources=[RevisionSourceIdentifier [name=test-model@2016-11-17], RevisionSourceIdentifier [name=test-model-op-only@2018-03-05], RevisionSourceIdentifier [name=b@2019-11-24], RevisionSourceIdentifier [name=a@2019-11-24]], parser=org.opendaylight.yangtools.yang.parser.impl.YangParserImpl@3bbf1c0d}: Failed to assemble sources: Some of EFFECTIVE_MODEL modifiers for statements were not resolved. Refine target node Relative{path=[(urn:opendaylight:b?revision=2019-11-24)path]} not found. [at test-model/src/main/yang/b.yang:14:30] -> [Help 1]
      
      

      Interestingly, refine target node is found when grouping is from same YANG model.

            Unassigned Unassigned
            rkosegi Richard Kosegi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: