Closed jsenecal closed 1 year ago
I can submit a PR if we indentify what we want to do with this, aka skip the entry/return None
/"" etc.
Probably related: #1767
actually not related, still using netaddr
Initial proposal for ipv6 neighbors: https://github.com/napalm-automation/napalm-base/pull/311 Base tests for IOS show incomplete entries: https://github.com/napalm-automation/napalm/blob/b90f184177c773da4cb650e9394d80c5f620beed/test/ios/mocked_data/test_get_ipv6_neighbors_table/normal/expected_result.json#L31-L35
Recommend explicitly testing state, only attempting to resolve/normalize MAC address when in a state where it would be present (REACH, STALE, DELAY, ?)
So we could just catch the exception thrown in by netaddr and return ""
I feel that an approach like that (purposely putting bad data in and catching an exception) may hide other issues that may also raise that same exception type -- explicitly bypassing the call to netaddr based on the output from the device would be safer, I think.
I submitted a pr in that direction - hope this helps :)
Description of Issue/Question
NAPALM w/junos driver fails to properly identify/sanitize the output of
junos_views.junos_ipv6_neighbors_table
when the mac address returned by the device isnone
.Did you follow the steps from https://github.com/napalm-automation/napalm#faq
Setup
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network operating system version
(Paste verbatim output from
show version
- or equivalent - between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)