-
Notifications
You must be signed in to change notification settings - Fork 55
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
Base64 encoded values data #539
Comments
Hi, gnmic is the one changing the received bytes value to base64 as per the json spec. Try adding --format prototext to your command to see the value sent from the router. |
@karimra, thanx for your extremely fast reaction! Here is a output with --format prototext key gnmic -a arista-switch:6030 -u admin -p admin --tls-ca arista.cer --tls-server-name leaf.dc --stream-mode sample sub --path /openconfig-platform:components/component/power-supply/state --sample-interval=30s --format prototext --debug
|
Check if the router returns a different value type if you change the encoding (--encoding ). |
The culprit here is There's no built-in mechanism AFAIK, but I guess the original question can be rephrased as: The fact that this format is not particularly user friendly has been discussed a few times in the OC community12, but so far there hasn't been an incentive to make the breaking change to the models. Footnotes |
Hi! @LimeHat, thanks for detailed explanation! @karimra, i tried to use different encoding types (JSON, BYTES, PROTO, ASCII, JSON_IETF), but it changes nothing in returned data. |
Have a good day, @karimra!
We try to get power-supply data from arista switch. It work fine, but returned data have a base64 encoded format. I just wanted to know does GNMIC has a built in mechanism for decoding such a values and how to get around this issue?
Thnx!
The text was updated successfully, but these errors were encountered: