Closed proebstle closed 9 months ago
Unfortunately vendors are doing whatever they want, without any rules. So depending on the vendor sometimes you can find the interface name as port id, sometimes in description. See get_remote_lldp_interface_label in utils, port_id has precedence over port_description. So the issue cannot be solved. We could add an additional rule, something like "if '/' in description, use description, but as you can imagine this is not a solution, only a patch. Let me know what do you think about.
Test #118
@proebstle / @dietybright any chance you can test this improvement?
Now looks fine
Perfect. I'm fixing the CI/CD then realeasing.
Hi, Netbox show the wrong port description....
1/1/51 | 1/1/51 | | Other | — | lag1 (lag1) | 1500 | — | Uplink_K-CORE-1 | | #1982 | HOSTNAME 136 (136)
Wrong: Neighbor Port-ID : 136 Right: Neighbor Port-Desc : 1/E8
Parsed output [{'capabilities': 'Bridge, Router', 'capabilities_enabled': 'Bridge, Router', 'chassis_desc': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ' 'KB.16.01.0006 ' '(/ws/swbuildm/rel_beluru_qt1_qaoff/code/build/bom(swbuildm_rel_beluru_qt1_qaoff_rel_beluru_qt1))', 'chassis_id': '34:64:a9:a0:93:xx', 'chassis_name': 'K-xx-1', 'local_port': '1/1/51', 'mgmt_addr': '172.16.3.xx', 'port_desc': '1/E8', 'port_id': '136'}, {'capabilities': 'Bridge, Router', 'capabilities_enabled': 'Bridge, Router', 'chassis_desc': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ' 'KB.16.01.0006 ' '(/ws/swbuildm/rel_beluru_qt1_qaoff/code/build/bom(swbuildm_rel_beluru_qt1_qaoff_rel_beluru_qt1))', 'chassis_id': '34:64:a9:a0:93:xx', 'chassis_name': 'K-xx-1', 'local_port': '1/1/52', 'mgmt_addr': '172.16.3.xxx', 'port_desc': '2/E8', 'port_id': '328'}]