You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a yang module has augment statement with more than 3 hierarchy in the path , then yang2swagger produces the following issue ,
(env) [xxxxxx@xxxxxxxx YangJsonTools]$ pyang --plugindir $PYBINDPLUGIN -f swagger -p input/ -o export/onf.json input/equipment-augment-1-0.yang
Traceback (most recent call last):
File "/home/stdapp/YANG2SWAGGER/onmi-iisomi-uml-common/YangJsonTools/env/bin/pyang", line 8, in<module>sys.exit(run())
File "/home/stdapp/YANG2SWAGGER/onmi-iisomi-uml-common/YangJsonTools/env/lib/python3.6/site-packages/pyang/scripts/pyang_tool.py", line 548, in run
emit_obj.emit(ctx, modules, fd)
File "/home/stdapp/YANG2SWAGGER/onmi-iisomi-uml-common/YangJsonTools/swagger.py", line 103, in emit
emit_swagger_spec(ctx, modules, fd, ctx.opts.path)
File "/home/stdapp/YANG2SWAGGER/onmi-iisomi-uml-common/YangJsonTools/swagger.py", line 180, in emit_swagger_spec
genAugmentedStatements(ctx, augments, definitions, model['paths'])
File "/home/stdapp/YANG2SWAGGER/onmi-iisomi-uml-common/YangJsonTools/swagger.py", line 205, in genAugmentedStatements
forapiin apis:
RuntimeError: OrderedDict mutated during iteration
Details :
The equipment-augment-1-0.yang which I m trying to translate has 4 augment statements.
The below augment statement in the YANG is causing this problem which has 5 hierarchy in its path ,
If a yang module has augment statement with more than 3 hierarchy in the path , then yang2swagger produces the following issue ,
Details :
The equipment-augment-1-0.yang which I m trying to translate has 4 augment statements.
The below augment statement in the YANG is causing this problem which has 5 hierarchy in its path ,
After removing this augment statement , I could able to generate swagger2.0 yaml file.
Please let us know whether this is an issue in the YANG2Swagger tool. If so , kindly please let us know is it possible to fix.
Many thanks.
The text was updated successfully, but these errors were encountered: