There are several CLI parameters that control how code is generated by the YANG compiler:


  • --deviation=str All YANG deviations for the target module will be applied if a deviation parameter is present and the module it specifies contains deviation statement that apply to the target module.


For example, to suppress code generation for some objects use the deviation statement "not-supported"

   

deviation /foo:top/foo:list1 {
   deviate not-supported
}

   

  • --indent=n To change the default indent amount of '2', use the indent parameter 


  • --sil-include=str To generate an #include statement for your H files, use the sil-include parameter  


  --sil-include=acme-system.h

In generated code...

    #include "acme-system.h" 

   

  • --sil-edit2 To generate EDIT2 style callbacks instead of EDIT1 callbacks, use the sil-edit2 parameter

  • --sil-get2 To generate GET2 style callbacks instead of GET1 callbacks, use the sil-get2 parameter

  • --sil-sa To generate SIL-SA library code instead of SIL code, use the sil-sa parameter