napalm-automation / napalm-ios

Apache License 2.0
31 stars 40 forks source link

get_lldp_neighbors_detail causes IndexError #49

Closed ktbyers closed 7 years ago

ktbyers commented 7 years ago
>>>Test get lldp neighbors
Traceback (most recent call last):
  File "test_ios.py", line 31, in <module>
    device_int = device.get_lldp_neighbors_detail()
  File "/home/kbyers/applied_python/local/lib/python2.7/site-packages/napalm_ios/ios.py", line 435, in get_lldp_neighbors_detail
    lldp_fields = [pad_list_entries(field, number_entries) for field in lldp_fields]
  File "/home/kbyers/applied_python/local/lib/python2.7/site-packages/napalm_ios/ios.py", line 402, in pad_list_entries
    my_list[i] = u"N/A"
IndexError: list assignment index out of range
pynet-rtr1#show lldp neighbors detail 
------------------------------------------------
Chassis id: 0018.fe1e.b020
Port id: 15
Port Description: 15
System Name: twb-sf-hpsw1

System Description: 
ProCurve J9019A Switch 2510-24, revision Q.10.01, ROM Q.10.02 (/sw/code/build/harp(harp))

Time remaining: 115 seconds
System Capabilities: B
Enabled Capabilities: B
Management Addresses:
    Other: 00 18 FF 1E FF 20 00
Auto Negotiation - not supported
Physical media capabilities - not advertised
Media Attachment Unit type - not advertised
Vlan ID: - not advertised

Total entries displayed: 1