napalm-automation / napalm-ios

Apache License 2.0
31 stars 40 forks source link

get_arp_table() bug with static arp entries #76

Closed ogenstad closed 7 years ago

ogenstad commented 7 years ago

Description of Issue/Question

While working with the pytest framework I noticed a bug. Will just ignore this for now and remove the static entry.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

Setup

napalm-ios version

napalm-ios==0.4.0

IOS version

(Paste verbatim output from show version between quotes below)

Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE4, RELEASE SOFTWARE (fc1)

Steps to Reproduce the Issue

conf term
 arp 10.0.0.1 0010.2345.1cda ARPA

The getter is running:

NS2903-ASW-01#show arp | exclude Incomplete
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.0.0.1                -   0010.2345.1cda  ARPA
Internet  172.29.50.1             6   84b8.0276.ac0e  ARPA   Vlan20
Internet  172.29.50.2           219   0019.0725.344a  ARPA   Vlan20
Internet  172.29.50.3             -   0024.f7dd.7741  ARPA   Vlan20
Internet  172.29.50.10           34   6805.ca12.71c2  ARPA   Vlan20
Internet  172.29.52.33           59   84b8.0276.ac0e  ARPA   Vlan41
Internet  172.29.52.34            -   0024.f7dd.7743  ARPA   Vlan41
Internet  172.29.52.40            1   a099.9b1c.dfa7  ARPA   Vlan41
Internet  192.168.81.34           -   0024.f7dd.7743  ARPA   Vlan41

NS2903-ASW-01#

Error Traceback

(Paste the complete traceback of the exception between quotes below)

>>> device.open()
>>> a = device.get_arp_table()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/patrick/.virtualenvs/napalm/lib/python2.7/site-packages/napalm_ios/ios.py", line 1177, in get_arp_table
    raise ValueError("Unexpected output from: {}".format(line.split()))
ValueError: Unexpected output from: [u'Internet', u'10.0.0.1', u'-', u'0010.2345.1cda', u'ARPA']
>>>
ktbyers commented 7 years ago

Will try to fix the week of 12/5 - 12/9.

ktbyers commented 7 years ago

Fixed here: https://github.com/napalm-automation/napalm-ios/pull/78/commits/c9cf4ad2b757720270ad6cc6b589f1ef62411a84