The driver standard says a read that fails raises instead of returning empty data (NetOrk ARCHITECTURE, "Getters read"). Two getters do not:
get_lldp_neighbors / get_lldp_neighbors_detail._get_lldp_table sends lldpctl -f keyvalue (napalm_openwrt/lldp_mixin.py:78) and keeps only lines containing = (line 85). If lldpd is missing or not running, or lldpctl cannot reach its socket, the error text has no =, and the getter returns {} — the same answer as "no neighbours".
get_environment (napalm_openwrt/system_mixin.py 41-82). If the awk over /proc/stat or cat /proc/meminfo fails or prints something else, the parse errors are swallowed and the defaults are returned:
The result says 0 % CPU and 0 bytes used/available, a plausible-looking value instead of a failure.
Expected
Both raise when the command fails or its output cannot be parsed; {} only when lldpctl ran and listed no neighbour. Test-first: lldpctl answering sh: lldpctl: not found raises; get_environment with unparsable /proc/stat raises.
(The CPU figure being the since-boot average is #10; the getter changing lldpd's config is #8.)
Priority: P3 — wrong figures and silently empty topology on any OpenWrt device where a read fails.
Found during the bug sweep of 2026-11-01.
## What happens
The driver standard says a read that fails raises instead of returning empty data (NetOrk ARCHITECTURE, "Getters read"). Two getters do not:
1. **`get_lldp_neighbors` / `get_lldp_neighbors_detail`.** `_get_lldp_table` sends `lldpctl -f keyvalue` (`napalm_openwrt/lldp_mixin.py:78`) and keeps only lines containing `=` (line 85). If lldpd is missing or not running, or lldpctl cannot reach its socket, the error text has no `=`, and the getter returns `{}` — the same answer as "no neighbours".
2. **`get_environment`** (`napalm_openwrt/system_mixin.py` 41-82). If the `awk` over `/proc/stat` or `cat /proc/meminfo` fails or prints something else, the parse errors are swallowed and the defaults are returned:
```python
cpu_pct = 0.0
...
except (ValueError, AttributeError):
...
mem_total = 0
```
The result says 0 % CPU and 0 bytes used/available, a plausible-looking value instead of a failure.
## Expected
Both raise when the command fails or its output cannot be parsed; `{}` only when lldpctl ran and listed no neighbour. Test-first: `lldpctl` answering `sh: lldpctl: not found` raises; `get_environment` with unparsable `/proc/stat` raises.
(The CPU figure being the since-boot average is #10; the getter changing lldpd's config is #8.)
Priority: P3 — wrong figures and silently empty topology on any OpenWrt device where a read fails.
Found during the bug sweep of 2026-11-01.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
The driver standard says a read that fails raises instead of returning empty data (NetOrk ARCHITECTURE, "Getters read"). Two getters do not:
get_lldp_neighbors/get_lldp_neighbors_detail._get_lldp_tablesendslldpctl -f keyvalue(napalm_openwrt/lldp_mixin.py:78) and keeps only lines containing=(line 85). If lldpd is missing or not running, or lldpctl cannot reach its socket, the error text has no=, and the getter returns{}— the same answer as "no neighbours".get_environment(napalm_openwrt/system_mixin.py41-82). If theawkover/proc/statorcat /proc/meminfofails or prints something else, the parse errors are swallowed and the defaults are returned:Expected
Both raise when the command fails or its output cannot be parsed;
{}only when lldpctl ran and listed no neighbour. Test-first:lldpctlansweringsh: lldpctl: not foundraises;get_environmentwith unparsable/proc/statraises.(The CPU figure being the since-boot average is #10; the getter changing lldpd's config is #8.)
Priority: P3 — wrong figures and silently empty topology on any OpenWrt device where a read fails.
Found during the bug sweep of 2026-11-01.