Skip to content
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

get_lldp_neighbors #2

Open
msiegy opened this issue Apr 20, 2020 · 4 comments
Open

get_lldp_neighbors #2

msiegy opened this issue Apr 20, 2020 · 4 comments

Comments

@msiegy
Copy link

msiegy commented Apr 20, 2020

get_lldp_neighbors() and get_lldp_neighbors_detail() fails on JL070A HPE 2530-8-poe running YB.16.08.0001 with KeyError: ChassisId... immediate issue looks like truncation occurs and SNMP is attempted but ChassisId is not a valid key in the key_mib_table. Attempts to add {'ChassisId': 'LldpChassisId'} to the dict did not help.

driver = get_network_driver('procurve')

device = driver('192.168.1.60', '', 'manager', optional_args={'ssh_config_file': '~/.ssh/config', 'port': 22})
device.open()
vals = device.get_lldp_neighbors_detail()

device.close()
print(json.dumps(vals, sort_keys=True,
                 indent=4, separators=(',', ': ')))

Grabbing LLDP RESULTS

opened Device connection
Traceback (most recent call last):
  File "hpcollector.py", line 14, in <module>
    vals = device.get_lldp_neighbors()
  File "C:\code\nac-discovery\venv\lib\site-packages\napalm_procurve\procurve.py", line 305, in get_lldp_neighbors
    remote_port, device_id = self._get_lldp_neighbors_detail(
  File "C:\code\nac-discovery\venv\lib\site-packages\napalm_procurve\procurve.py", line 372, in _get_lldp_neighbors_detail
    tmp_lldp_details = self._lldp_detail_parser(interface)
  File "C:\code\nac-discovery\venv\lib\site-packages\napalm_procurve\procurve.py", line 411, in _lldp_detail_parser
    '{}.0.{}.1'.format(key_mib_table[key], ifs[interface]))
KeyError: 'ChassisId'

@ixs
Copy link
Collaborator

ixs commented Jul 19, 2020

Hi @msiegy, thanks for your report. I missed it somehow, sorry for that. Now I'm getting notifications from this repo too.

Could you please give me the full output of show lldp info remote-device on your device? That can help me a) build a test for this use case to prevent regression and b) fix the problem in the first place.

Thanks a lot.

@ixs
Copy link
Collaborator

ixs commented Aug 27, 2020

@msiegy Hi Matt,

can you get me the output of show lldp info remote-device please? That helps understanding what is going on.

thanks.

@thefathacker
Copy link

@ixs I have been looking at his issue, I have also been having this issue as well. I am using a 5406zl2 Switch

Output of remote-device detailed

` LLDP Remote Device Information Detail

Local Port : B5
ChassisType : local
ChassisId : 00000000-0000-0E00-000...
PortType : mac-address
PortId : a0 0a f0 00 0e b0
SysName :
System Descr : ProLiant DL360 Gen10
PortDescr : PCI-E Slot 1, Port 1
Pvid :

System Capabilities Supported :
System Capabilities Enabled :

Remote Management Address
Type : ipv4
Address : XXX.XXX.XXX.XXX
Type : all802
Address : a0 0a f0 00 0e b0
`

Appears the OID is .1.3.6.1.4.1.9.9.23.1.2.1.1.6.37.1 = STRING: "00000000-0000-0E00-0000-000000000000"

@thefathacker
Copy link

Works after adding "ChassisId": "lldpRemChassisId" to key_mib_table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants