mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 21:13:00 +02:00
cli-pretty: only print stp state if oper status is up
Only print bridge port stp state if operational status of the interface is up. Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
committed by
Tobias Waldekranz
parent
1827b65182
commit
0cb1459f43
@@ -217,11 +217,11 @@ class Iface:
|
||||
|
||||
row = f"{'bridge':<{Pad.proto}}"
|
||||
|
||||
if self.oper_status == "down":
|
||||
row += Decore.red(f"{'DOWN':<{Pad.state}}")
|
||||
else:
|
||||
if self.oper_status == "up":
|
||||
dec = Decore.green if self.stp_state == "forwarding" else Decore.yellow
|
||||
row += dec(f"{self.stp_state.upper():<{Pad.state}}")
|
||||
else:
|
||||
row += Decore.red(f"{self.oper_status.upper():<{Pad.state}}")
|
||||
|
||||
for vlan in br_vlans:
|
||||
if 'tagged' in vlan:
|
||||
|
||||
Reference in New Issue
Block a user