For gnmi_ext.proto, run protoc with github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto (this is for reflections). #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem
gNMI server reflections is basically facing the same issue as mentioned in fullstorydev/grpcurl#22. When the
gnmi_ext.proto
file gets compiled with pathproto/gnmi_ext/gnmi_ext.proto
, gNMI server reflection breaks with the following error:The Proposal
If
gnmi_ext.proto
gets compiled withgithub.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto
, gNMI server reflections work. So, I modified thegnmi_ext.proto
portion incompile_protos.sh
to (only the go binding):I assumed that the
github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto
path is under${GOPATH}/src
.$proto_imports_go
includes${GOPATH}/src
so the go binding should be generated under${GOPATH}/src/github.com/openconfig/gnmi/proto/gnmi_ext/
.Manual Testing
In my case, I have
gnmi_ext.proto
under/vendor/github.com/openconfig/gnmi/proto/gnmi_ext/
. When I didThe generated go binding's source is identified as
github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto
and the gNMI server reflections work.A Request
This is a message to the reviewer of this pull request. Please modify the python binding portion of
compile_protos.sh
if necessary. Also, pleasecompile_protos.sh
to modifygnmi_ext.pb.go
under${GOPATH}/src/github.com/openconfig/gnmi/proto/gnmi_ext/
. Thank you.