You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LLDP] Fix lldpshow script to enable display multiple MAC addresses on the same remote physical interface (sonic-net#1657)
Scenario:
1- remote interface has 2 MACs on the same physical interface.
2- "show lldp table" command displays one entry for only one MAC address
Root cause:
"show lldp table" command uses lldpshow script to get, parse and display data from the lldp open source package
(lldpctl script). lldpctl script returns a proper info about the 2 MACs but the issue is with the lldpshow script parser
where it built a dictionary which its key is the local physical interface. Therefore when having 2 MACs, lldpctl will
return 2 entries but the lldpshow parser will overwrite the first enrty.
Fix:
Change the key to be a string of "interface#MAC".
This will enable having 2 entries for 2 different MAC addresses.
In addition:
- update display_sum()-->get_summary_output() to return a string instead of printing it directly.
this to allow checking the returned value inside the new unit test.
- add a new unit test for this scenario.
Signed-off-by: Basim Shalata <[email protected]>
0 commit comments