Closed liuqu closed 4 years ago
Hi,
Thanks for the issue. Can you please provide the command that you used to generate the output package with generator
please? It's useful for us to understand exactly the combination of options used for debugging.
Thanks, r.
Thanks for your reply. Here is the command.
go run $GOPATH/src/github.com/openconfig/ygot/generator/generator.go -generate_fakeroot -path=yang -output_file=oc-telemetry/oc-telemetry.go -package_name=openconfig -exclude_modules=ietf-interfaces yang/oc-telemetry/openconfig-telemetry.yang
Thanks -- I have an example that reproduces the bug - and agree with your diagnosis. It looks like when we do the walk to handle ..
, we don't cleanly handle being inside a list. This is meaning that we are consuming two ..
elements of the path such that the specified leafref
path
doesn't get us to the relevant jumping off point to resolve the rest of the path
.
Working to debug why now.
Sorry -- this dropped off my radar. The https://github.com/openconfig/ygot/tree/debug-185 branch fixes this issue. Apologies for the delay in fixing it!
Rob's #214 fixed this.
Hi, guys, I tried the basic workflow of ygot for openconfig-telemetry yang model, but it fails to validate the contents of Go struct. I think the the contents of struct is complete. It looks like validate module couldn't get correct leafref which under the list.
Here is the schema tree and struct contents.
"openconfig.OpenconfigTelemetry_TelemetrySystem_Subscriptions_Persistent_Subscription_DestinationGroups_DestinationGroup_Config" should get the root path node "openconfig.OpenconfigTelemetry_TelemetrySystem" not "openconfig.OpenconfigTelemetry_TelemetrySystem_Subscriptions_Persistent".
It looks like get the wrong data type this step