-
Notifications
You must be signed in to change notification settings - Fork 11
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
OOBM interface needs to be handled differently #1
OOBM interface needs to be handled differently #1
Conversation
@carsten-AEI thank you for that fix. I'm gonna have a look how to implement that best and maybe make it more generic. Would you be able to provide me with the full output of "show interfaces brief" and "show lldp info remote-device" please? |
Oh gosh, I somehow missed your reply
|
Perfect. Thank you for this, that helps me a lot... |
@carsten-AEI Hmm. I realized something is missing. |
Unfortunately, when running device.open()
vals = device.get_lldp_neighbors_detail()
device.close() it fails similarly to #2 with Traceback (most recent call last):
File "./test.py", line 17, in <module>
vals = device.get_lldp_neighbors_detail()
File "/home/carsten/.local/lib/python3.8/site-packages/napalm_procurve/procurve.py", line 340, in get_lldp_neighbors_detail
lldp_neighbors = self.get_lldp_neighbors()
File "/home/carsten/.local/lib/python3.8/site-packages/napalm_procurve/procurve.py", line 306, in get_lldp_neighbors
remote_port, device_id = self._get_lldp_neighbors_detail(local_port)
File "/home/carsten/.local/lib/python3.8/site-packages/napalm_procurve/procurve.py", line 376, in _get_lldp_neighbors_detail
return (tmp_lldp_details["PortId"], tmp_lldp_details["SysName"])
KeyError: 'PortId' (also it takes about three minutes to arrive at this error but that may be caused by me running it via a VPN connection cobbled together and via telnet as the switch's ssh KEX methods are too ancient 😉 ) Any quick idea what to inject where to debug this? My Python foo is severely lacking... (edit: This was tested against released version, i.e. |
@carsten-AEI are you getting this error with your patch applied or without? It'd need your patch to get any output I believe. This makes life a bit more complex though as we're going to need to build a more complete test case to go into napalm-procurve:/test/unit/mocked_data/test_get_lldp_neighbors/2920-oobm. I'd need the output of the following commands please:
And for good measure, what does autocomplete show you for the interface? e.g. when you type show lldp info remote device [tab][tab]. On my 2910al I'm getting the following:
Would be interesting seeing what you're getting. I might also need the output of a few walkMIB commands, but we'll see about that. Thanks for your help, this way I can mock your switch and make sure that the test-suite runs well on it. |
Yeah, the patch was needed 😊 Let's try to gather all the info:
|
This was great and super helpful. Thank you. Now for the MIB commands: What do you get for walkMIB ifName? |
Just verbatim?
|
@carsten-AEI thanks again for your help. Your code has been merged together with a testcase. |
On our "HP J9728A 2920-48G Switch" with OS version WB.16.03.0003
self._lldp_detail_parser(interface)
returned an empty dict for the OOBM interface as it needs to be queried differently.I hope this small patch helps fixing it for other switches as well without breaking it on others.