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

gnmi enhancement to support json_ietf encoding and work when json_ietf_val is bytes string #58

Closed
brunoonovais opened this issue Apr 29, 2022 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@brunoonovais
Copy link
Collaborator

  • 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!

@akarneliuk
Copy link
Owner

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:

if encoding in encoding_set:

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

@akarneliuk akarneliuk added the bug Something isn't working label May 1, 2022
@brunoonovais
Copy link
Collaborator Author

brunoonovais commented May 3, 2022 via email

@akarneliuk
Copy link
Owner

Hey @brunoonovais ,

sounds good, looking forward.

Best,
Anton

@brunoonovais
Copy link
Collaborator Author

brunoonovais commented Jun 2, 2022 via email

@akarneliuk
Copy link
Owner

Hey @brunoonovais,

sure, please send it to me or submit PR so I can review directly there.

Best,
Anton

@akarneliuk
Copy link
Owner

Hey @brunoonovais ,

hope you are well. Are you still going to submit PR?

Best,
Anton

@brunoonovais
Copy link
Collaborator Author

brunoonovais commented Jul 15, 2022 via email

@akarneliuk
Copy link
Owner

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

@akarneliuk akarneliuk self-assigned this Aug 10, 2022
@brunoonovais
Copy link
Collaborator Author

brunoonovais commented Aug 11, 2022 via email

@akarneliuk
Copy link
Owner

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

@akarneliuk
Copy link
Owner

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?

@akarneliuk
Copy link
Owner

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

@akarneliuk
Copy link
Owner

Closed due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants