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

Change encoding for eapi responses to json #50

Open
siguroot opened this issue May 15, 2023 · 2 comments
Open

Change encoding for eapi responses to json #50

siguroot opened this issue May 15, 2023 · 2 comments

Comments

@siguroot
Copy link
Contributor

Is it possible to set the desired encoding type returned by eapi. It seems to default to 'text', however json would be much more desirable. In napalm I normally do this via cmd = device.cli(['show interfaces transceiver detail'], encoding='json')

Is there a way to pass encoding='json' to cli in nornir_napalm?

@ktbyers
Copy link
Collaborator

ktbyers commented May 16, 2023

https://github.com/nornir-automation/nornir_napalm/blob/master/nornir_napalm/plugins/tasks/napalm_cli.py#L8

It looks like you would need to add do a PR to add support for the encoding argument which is not passed (right now).

@siguroot
Copy link
Contributor Author

I have submitted a PR. Never done one before so go easy on me! Open to any feedback/suggestions.

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