mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
528 stars 342 forks source link

adding --uml-no-inline-groupings-from #872

Open kirankotari opened 11 months ago

kirankotari commented 11 months ago

When we use --uml-inline-grouping flag we can expect to ignore base modules like tailf-ncs etc, in this PR we are added new flags.

Command:

pyang -f uml l3vpn.yang --path=/tmp/.ncs_uml --uml-inline-groupings --uml-skip-module=tailf-ncs --uml-output-directory=.  --uml-no=module,import,annotation  --uml-add-legend 2> /dev/null

--uml-add-legend adds filenames from shared grouping - Note: not skipping any module for this example Here is the legend plantUML code generated.

legend
Grouping data pulled from
  l3vpn.yang
  tailf-ncs-services.yang
  tailf-ncs-log.yang
endlegend

--uml-skip-module=tailf-ncs with --uml-inline-groupings, inline grouping adds all the grouping uses in the yang including the base service-data, plan-date and more, in the new flag we can skip entire module from inline-grouping. Here the skip modules are kept in the {uses} as before --uml-inline-groupings flag.

Image before the --uml-skip-module image

Image with --uml-skip-module image

kirankotari commented 11 months ago

@nkhancock Thanks for reviewing it. I will do update and improve the content.