ygot icon indicating copy to clipboard operation
ygot copied to clipboard

Ygot can‘t handle with nodes of owning the same name

Open nanfengnan1 opened this issue 2 months ago • 1 comments

root@alexan-PowerEdge-R740:/opt/frr/deps/ygot/demo/ospf# ../../generator/generator -generate_fakeroot -fakeroot_name=ospf -compress_paths=true -path=yang -path=/usr/sh./yang -output_file=ospfd.go -package_name=oc yang/frr-ospfd.yang F1020 08:54:54.144028 293213 generator.go:352] ERROR Generating GoStruct Code: duplicate entry interface at the root: exists: /ietf-interfaces/interfaces/interface, new: /ietf-interfaces/interfaces-state/interface root@alexan-PowerEdge-R740:/opt/frr/deps/ygot/demo/ospf#git branch master v0.30.0

  • v0.9.0

nanfengnan1 avatar Oct 20 '25 08:10 nanfengnan1

You cannot do this with compress_paths=true, since this expects the OpenConfig style guide rules to be met (including no duplicate names at the root). Using compress_paths=false (the default) will allow this to be the case by having these nodes being called OwningModule_Interfaces.

robshakir avatar Oct 27 '25 10:10 robshakir