gnmi enhancement to support json_ietf encoding and work when json_ietf_val is bytes string
brunoonovais opened this issue · 13 comments
- Can we support different encodings for get? I think we just need a new argument (already made local change and it works).
- On top of that, when json_ietf_val is a bytes string, we hit json.decoder.JSONDecodeError exception. Example:
json_ietf_val = b'DIRECTLY_CONNECTED'
This could be a simple fix as well, which I've made locally and it works.
Thank you for the awesome library!
Hey @brunoonovais ,
thanks for your message. I'm not too sure I do understand the request, as pygnmi
already supports all encodings, which are supported by gNMI:
Line 272 in 903e50b
On a second one, it would be good to see, what was the request you have so far performed to receive such an answer. Given it is a DIRECTLY_CONNECTED
, I would assume you have requested for a specific route. However, it would be good to see the message, which caused an exception, if possible.
Overall, if you feel that something can be improved, you are welcome to raise a pull request ;-)
Best,
Anton
Hey @brunoonovais,
sure, please send it to me or submit PR so I can review directly there.
Best,
Anton
Hey @brunoonovais ,
hope you enjoy a new job :-) I believe your request is now sorted by #92 . Could you please test and let me know if anything else is needed?
Best,
Anton
Hello @brunoonovais ,
First of all, I believe it is related to another issue, namely #85 . Second, I so far was not able to reproduce the issue against vEOS. but I will try another go.
Best,
Anton
Also, what is interesting. where are you running that from? It doesn't seem you properly install it via pip
as otherwise you would run it as pygnmicli
without ./
. What version of Python do you have on the host?
Hello @brunoonovais ,
Both your requested items are sorted in #93 and published in pygnmi==0.8.8
, which is just released in pypi as well. Please, test and let me know.
Best,
Anton
Closed due to inactivity