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

How to send set request with proto encoding? #126

Open
ganglyu opened this issue Jun 30, 2023 · 2 comments
Open

How to send set request with proto encoding? #126

ganglyu opened this issue Jun 30, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ganglyu
Copy link

ganglyu commented Jun 30, 2023

I'm trying to send set request with proto encoding.
But it's impossible to send binary bytes with proto encoding, because pygnmi uses json.dumps:
https://github.com/akarneliuk/pygnmi/blob/master/pygnmi/client.py#L1302
Does pygnmi support set request with proto encoding?
Please let me know what you think.

@akarneliuk
Copy link
Owner

Hello @ganglyu ,

Could you talk more about use case? I started seeing some vendors coming with proto encoding, but mainly for telemetry.
The main issue with protobuf is that there is no vendor neutral proto-files. As such, you need to encode message using the proto file from vendor before putting into the wire. We can work on this use case, though.

Best,
Anton

@akarneliuk akarneliuk added the enhancement New feature or request label Jul 24, 2023
@ganglyu
Copy link
Author

ganglyu commented Jul 25, 2023

Hi,
I'm trying to use pygnmi to set and get data with proto encoding data, and set request failed because pygnmi uses json.dumps.
You can use ygot to convert YANG model into Protobuf format.
https://karneliuk.com/2020/05/gnmi-part-1-intro-to-protobuf/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants