-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Get_Environment from napalm should not need any decoding #8063
Conversation
|
I'm fairly certain that while this may fix data from IOS devices, it will break data from Aruba CX devices, thus regressing #7041. I can see a few options forward:
4 is probably the best, 3 is probably the easiest :) |
IMO this looks like a bug in the Arbua NAPALM driver. The below output was cited under #7041:
The interface names are URL-escaped for some reason, which I would not expect. I noticed that the slash in some IP addresses gets escaped as well. We really shouldn't need to do any processing of the NAPALM response data; |
I don't disagree. #7041 was originally opened because of If we don't care about "breaking" Aruba CX NAPALM interface checks, then I have no issue removing |
Test without decode_dict function Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
To report the same error experienced here was impacting EOS Napalm driver as well within Netbox; with the modification to line 504 in view.py of the api resolved the error.. |
I can also confirm that this did not effect the following drivers and the upgrades made to increase their functionality within the napalm tool and more specifically the get_facts and get_environment calls within Napalm; |
Fixes: #7246
As stated already in the issue, napalm method
get_environment
is currently failing. Dictionary coming from napalm driver are already sanitized and therefore param decode_keys should be set to false before calling decode_dict.https://github.com/napalm-automation/napalm/blob/develop/napalm/base/base.py#L465
https://github.com/napalm-automation/napalm/blob/develop/napalm/ios/ios.py#L2197
This was tested with ios driver.