Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-589

$YangModuleInfoImpl not generated

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Cannot Reproduce
    • None
    • 6.0.4
    • Binding codegen
    • None

    Description

      When using module containing only extension(s), the $YangModuleInfoImpl.java class for this module is not generated.

      As a workaround, the extension module needs to contain at least one other element - It works when (at least) container or identity was added to module.

      module with extension defined:

      module extension-model {
          yang-version 1;
          namespace "extension-model";
          prefix "ex";
      
          revision "2020-08-13" { }
      
          extension custom-ex {
              description ".....";
          }
      }

      module where extension is used:

      module main-model {
          yang-version 1;
          namespace "main-model";
          prefix "main";
      
          import extension-model { prefix "ex"; }
      
          revision "2020-08-13" { }
      
          container root-contaner {
              leaf leaf1 {
                  type string;
                  ex:custom-ex;
              }
          }
      }
      

      for these it will not generate $YangModuleInfoImpl.java class file.

       

      the $YangModuleInfoImpl.java class will be generated if extension model is updated by adding dummy container:

      module extension-model {
          yang-version 1;
          namespace "extension-model";
          prefix "ex";
      
          revision "2020-08-13" { }
      
          extension custom-ex {
              description ".....";
          }
      
          container dummy {
              // necessary element in only extensions model
          }
      }
      

      Example models are shown also in gerrit change 92155

      Attachments

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

        Activity

          People

            rovarga Robert Varga
            mibanik Michal Banik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: