Comparing YANG Modules

The yangdiff-pro program compares YANG files in the following manner:

  • The cooked object trees are compared, not the actual YANG statements.

  • Whitespace differences are ignored.

  • Non-semantic changes are ignored:

    • A uses-stmt can replace a set of objects if the grouping is identical to the old objects.

    • Refine statements are combined into the cooked objects, and not compared directly.

    • A typedef statement can replace an inline type statement

    • Changes to YANG comments are ignored.

    • Sub-statement order is ignored, however object order with a container or list is not ignored.

    • Objects can be moved to submodules, and include statements instead.

If the --old parameter is missing, then the module search path will be used to find the specified module with the same name. If the --old parameter contains just a module name, then the module search path will be used to find a module with the new name.

The --new parameter is required. It can represent one YANG file or a directory of new YANG modules.

The --difftype parameter is optional. The 'normal' report mode is used if this parameter is missing.

The --output parameter will be used for the report file, if it is specified.




Definition has been added.


Definition has been modified.


Definition has been deleted.