Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need gnmi_cli set request example #13

Closed
kboyapa1 opened this issue Oct 27, 2017 · 3 comments
Closed

Need gnmi_cli set request example #13

kboyapa1 opened this issue Oct 27, 2017 · 3 comments

Comments

@kboyapa1
Copy link

I am getting following error when used "-set" to trigger SetRequest from gnmi_cli. What would be the SetRequest syntax for gnmi_cli?

./gnmi_cli -address myServer:5000 -ca_crt /data/users/server.crt -set "/eqpt/shelf/1/admin-status" -update "down" -timeout 10s
E1026 23:43:21.831747 37571 gnmi_cli.go:141] Set failed: Query() must be called before any operations on client

@awly
Copy link
Contributor

awly commented Oct 27, 2017

Well that's embarrassing. We never executed the set command and didn't catch this.
The client library code is very Subscribe-centric and doesn't account for Set implementation.
I'll try to reorganize it.

And usage also isn't explained well for flags. Your command should be something like:
./gnmi_cli -address myServer:5000 -ca_crt /data/users/server.crt -set -update "/eqpt/shelf/1/admin-status=down"

@kboyapa1
Copy link
Author

Thank you awly for your quick response. I am still getting the same error message with the setRequest syntax you proposed. Please update when the gnmi_cli is reorganized for Set implementation.

./gnmi_cli -address myServer:5000 -ca_crt /data/users/server.crt -set -update "/eqpt/shelf/1/admin-status=down"
E1030 01:29:04.194032 30334 gnmi_cli.go:141] Set failed: Query() must be called before any operations on client

@awly
Copy link
Contributor

awly commented Dec 5, 2017

I believe 4597a86 fixes this.
Please reopen if it still fails.

@awly awly closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants