ygot icon indicating copy to clipboard operation
ygot copied to clipboard

Silently dropping leaf in ietf-routing model

Open ccakes opened this issue 2 years ago • 2 comments

I think I've found an issue with ygot in YANG models that have an augment inside a uses. I've greated a repo with a reproduction case here - https://github.com/ccakes/ygot-uses-augment

In short, this augment doesn't seem to be picked up by ygot and the resulting Go code is missing the next-hop-address leaf.

https://github.com/ccakes/ygot-uses-augment/blob/5129adbf6c6991d5cb7b74626ddc1941792cc48c/ietf-ipv4-unicast-routing%402018-03-13.yang#L99-L111

pyang detects it fine and as far as I can tell it's valid YANG. Any ideas?

ccakes avatar Nov 17 '21 02:11 ccakes

I believe this is due to goyang not processing "augment" statements inside "uses" statements at all. Is it possible for you to change this to a module-level augment to work around this? I can take a look at a fix this week.

wenovus avatar Nov 17 '21 03:11 wenovus

Thanks for the quick response! I've done that in the interim but would love to stick to the IETF models if I can. Whenever a fix is possible would be appreciated 👍

ccakes avatar Nov 17 '21 03:11 ccakes