Closed Ankur19 closed 1 year ago
@wenovus Please review.
@Ankur19 Does https://github.com/openconfig/goyang/blob/1d9b70a64cbe8e0ba42f95ab5c4e1ea81ac17c19/pkg/yang/entry.go#L1310 work? I'm assuming you're working with goyang structs so if the use case is not ygot-specific then goyang should be satisfying the need.
@Ankur19 Does https://github.com/openconfig/goyang/blob/1d9b70a64cbe8e0ba42f95ab5c4e1ea81ac17c19/pkg/yang/entry.go#L1310 work? I'm assuming you're working with goyang structs so if the use case is not ygot-specific then goyang should be satisfying the need.
Let me check. Thanks for the pointer.
@Ankur19 Does https://github.com/openconfig/goyang/blob/1d9b70a64cbe8e0ba42f95ab5c4e1ea81ac17c19/pkg/yang/entry.go#L1310 work? I'm assuming you're working with goyang structs so if the use case is not ygot-specific then goyang should be satisfying the need.
The Find
method returns a null pointer for a few Paths.
e.g. /oc-netinst:network-instances/oc-netinst:network-instance/oc-netinst:config/oc-netinst:name
Exporting this functionality looks fine to me since it provides handling that goyang's Entry.Find doesn't have.
Can you put it in a separate package called
yangschema
? Then we can rename the type toyangschema.Tree
.
Done!
I would like to build the
SchemaTree
using yang Entries and then use theResolveLeafRefTarget
method to calculate the actual data type of aleafref
.