yanger: Allow lldpd to be disabled (or crashed)

Allow to query operational even with no lldpd running.
This commit is contained in:
Mattias Walström
2025-12-18 08:53:03 +01:00
parent 45ff5d232e
commit 0a9664eea6
+1 -1
View File
@@ -34,7 +34,7 @@ def operational():
port_data = defaultdict(lambda: {"remote-systems-data": [], "dest-mac-address": LLDP_MULTICAST_MAC})
data = HOST.run_json(["lldpcli", "show", "neighbors", "-f", "json"])
data = HOST.run_json(["lldpcli", "show", "neighbors", "-f", "json"], {})
interfaces = data.get("lldp", {}).get("interface", [])