make show interfaces parser portchannel compatible

This commit is contained in:
Daniel Bacher committed 2020-11-16 10:46:54 +01:00
1 parent a431aaa8a8
commit f0b360aa25
1 file changed
+4 -1
+4 -1
View File
@@ -389,7 +389,10 @@ class S350Driver(NetworkDriver):
for status_line in show_status_output.splitlines():
if 'Up' in status_line or 'Down' in status_line:
interface, _, _, speed, _, _, link_state, _, _ = status_line.split()
if "Po" in status_line:
interface, _, _, speed, _, _, link_state = status_line.split()
else:
interface, _, _, speed, _, _, link_state, _, _ = status_line.split()
# Since the MAC address for all the local ports are equal, get the address
# from the first port and use it everywhere.