ixs / napalm-procurve

HP ProCurve Driver for NAPALM automation frontend
Apache License 2.0
21 stars 15 forks source link

get_lldp_neighbors fails when ChassisId is truncated #15

Open rgilijamse opened 3 years ago

rgilijamse commented 3 years ago

When neighbor devices have a very long Chassis ID, looking up this value in the MIB fails:

File "/home/rgilijamse/scripts/_venv/lib/python3.8/site-packages/napalm_procurve/procurve.py", line 423, in _lldp_detail_parser
    "{}.0.{}.1".format(key_mib_table[key], ifs[interface])
KeyError: 'ChassisId'

Easy to fix: add the correct MIB id to key_mib_table in _lldp_detail_parser (line 388)

"ChassisId": "lldpRemChassisId",
rgilijamse commented 3 years ago

I can add a PR for this if you want, but it'll take me some time to set up an environment for that.