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
I used ygot/generator/generator.go to generate the gostruct file using yang files as input.
I have a scenario where following heirarchy of elements causing the error.
/container/choice/case/container/list/leaf (leaf is of leafref type)
I have debugged and found that in api ResolveLeafrefTarget in ygot/yangschema/yangschema.go file
fixedPath, err := fixSchemaTreePath(path, contextEntry) --> here value is fixedPath doesnt has choice and case name which is ended in error of "could not resolve leafref path"
Let me know if this kind of scenario is supported in ygot.
The text was updated successfully, but these errors were encountered:
Please can you provide a module that creates this issue. It's likely that we have a test coverage issue, since choice and case are not widely used in models that we see heavy use of.
I ran following command :
go run /root/go/pkg/mod/github.com/openconfig/[email protected]/generator/generator.go -generate_fakeroot -output_file test.go -package_name goabc -exclude_modules ietf-interfaces -path http://github.com/openconfig/public --generate_simple_unions abc.yang
Got following error :
F0829 13:50:40.354242 21675 generator.go:382] ERROR Generating GoStruct Code: could not resolve leafref path: [abc b-state details detail config id]
I used ygot/generator/generator.go to generate the gostruct file using yang files as input.
I have a scenario where following heirarchy of elements causing the error.
/container/choice/case/container/list/leaf (leaf is of leafref type)
I have debugged and found that in api ResolveLeafrefTarget in ygot/yangschema/yangschema.go file
fixedPath, err := fixSchemaTreePath(path, contextEntry) --> here value is fixedPath doesnt has choice and case name which is ended in error of "could not resolve leafref path"
Let me know if this kind of scenario is supported in ygot.
The text was updated successfully, but these errors were encountered: