Fix lint: wrap long line in diagnose.py; make demo scripts flake8-clean
Lint / Python (flake8) (push) Successful in 1m11s
Lint / JS (eslint) (push) Successful in 14s
Lint / Notify on failure (push) Skipped
Security / Python Security (bandit) (push) Successful in 49s
Test / Python Tests (pytest) (push) Successful in 1m0s
Lint / Deploy (push) Successful in 3s

This commit is contained in:
2026-10-03 16:58:52 -04:00
parent 4a1998046b
commit e1716d5228
4 changed files with 602 additions and 179 deletions
+2 -1
View File
@@ -536,7 +536,8 @@ class DiagnosticsRunner:
if lldp.get('available'):
expected_switch = (switch_port_data.get('switch_name') or '').lower()
srv_neighbor = (lldp.get('neighbor_system') or '').lower()
if expected_switch and srv_neighbor and expected_switch not in srv_neighbor and srv_neighbor not in expected_switch:
names_differ = expected_switch not in srv_neighbor and srv_neighbor not in expected_switch
if expected_switch and srv_neighbor and names_differ:
add(warnings, 'LLDP_MISMATCH',
f'LLDP mismatch: this port is on "{switch_port_data.get("switch_name")}" but the server\'s '
f'lldpctl sees "{lldp.get("neighbor_system")}" — cross-cabled port?')