-
Notifications
You must be signed in to change notification settings - Fork 556
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
Fix EOS get_arp_table for static ARP records #1272
Fix EOS get_arp_table for static ARP records #1272
Conversation
napalm/eos/eos.py
Outdated
@@ -966,7 +966,7 @@ def get_arp_table(self, vrf=""): | |||
interface = str(neighbor.get("interface")) | |||
mac_raw = neighbor.get("hwAddress") | |||
ip = str(neighbor.get("address")) | |||
age = float(neighbor.get("age")) | |||
age = float(neighbor.get("age", 0.0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use -1.0
to mark static entries? I notice nxos uses this approach, but IOS doesn't. Perhaps worth standardizing on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for -1.0 for all OSes, as looks like "-1" is a standard value for N/A in Napalm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. @praniq - please feel free to update this branch, then I can merge it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated EOS, IOS and IOS XR. Please have a look. Thanks
…device didn't return any value. Usually for static ARP entries or local IPs. NX-OS already does this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @praniq
For static ARP entries EOS eAPI gives records without "age" key. Therefore NAPALM throws an exception in get_arp_table during:
age = float(neighbor.get('age'))
Fixing this bug.