Closed iwanb closed 2 months ago
Would it be possible to consider a fix for this issue? @OpenConfigBot
Sure - per the CI, we observe that pyang, goyang and other toolchains do not see that this is an issue -- as long as the prefix resolution works in the correct way (since the context node may use different prefixes than the value defined in the openconfig-network-instance
) module, then this should be a no-op change.
This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.
In openconfig-network-instance there is this typedef:
Which is used in openconfig-aft-network-instance:
But the leafref path is resolved in the namespace where it is used, not where it is defined. It's not very clear in the Yang 1.0 RFC but the 1.1 says explicitly:
I found it using yanglint from libyang, which gives this error when trying to load openconfig-aft-network-instance:
err : No resolvents found for leafref "/network-instances/network-instance/config/name". (/openconfig-network-instance:network-instances/openconfig-network-instance:network-instance/openconfig-network-instance:afts/openconfig-network-instance:next-hops/openconfig-network-instance:next-hop/openconfig-network-instance:state/network-instance)
So AFAIK the path should be:
path "/oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:config/oc-netinst:name";