Closed Phill93 closed 3 years ago
You are right ... I never saw so long Port ID ...
May be it will be better to parse it as columns of chars [0-8] [10-xxx] ... and then react on partially empty line ...
@Phill93 Are both output from devices with terminal width 512
as there is fields length diference ...
Port Device ID Port ID System Name Capabilities TTL
--------- ----------------- ------------- ----------------- ------------ -----
Port Device ID Port ID System Name Capabilities TTL
--------- ----------------- ----------------- ----------------- ------------ -----
What device types are that exactly, and what is os_version ?
It could lead to counting of -
...
Hello,
the first output comes from my Lab SG300-10 (OS: 1.4.11) the second from a productive SG550XG-24F (OS: 2.5.0.92), both with terminal width 512
.
I posted this in the Cisco Forum a few days ago, according to them terminal width
doesn't change anything in the column widths. => https://community.cisco.com/t5/small-business-switches/set-column-width/m-p/4176384
get_lldp_neighbors fails on SG500 devices
see test for SG500-28-K9: daeb208fe73ab512af3cea1f7549d31b444a00b7
AssertionError: Expected result varies on some keys {"gi1/1/3": {"result": [{"hostname": "pc123.cli Hents.test.net", "port": "00:23:24:02:66:e4"}], "expected": [{"hostname": "pc123.clients.test.net", "port": "00:23:24:02:66:e4"}]}}
I am working my way through the development branch and came across the parser for lldp neigbors. I don't think it works reliably. I have seen the case that both the system name and the port ID can be wrapped.
Examples:
Lines: https://github.com/napalm-automation-community/napalm-s350/blob/657bcc570ddcb0115e017fc2819aa38f95bde177/napalm_s350/s350.py#L360-L396