fix(packages): install_package decides by the exit status; keywords only when there is none (#4). The return-type mismatch with device-types is tracked in NAPALM/napalm-device-types#36.
fix(vpn): the WireGuard peer key prefix is URL-safe (+→-, /→_), as in napalm-opnsense; affected peers get a new key once (#43).
fix(processes): started holds ps's whole five-word start time; ps runs under LC_ALL=C (#21).
fix(packages): packages in dpkg state rc/n are left out of apt's package list (#17).
fix(ping): BusyBox and iputils summaries, round-trip lines, IPv6 and link-local replies (#15).
fix(routes): IPv4 and IPv6 routes are read separately; the IPv6 default is ::/0, an IPv6 host route /128 (#6).
Parsers moved into small strict modules (_dpkg.py, _ping.py, _routes.py); linux.py shrank from 2265 to 2142 lines, the ratchet baseline only shrank. No public signature changed; napalm-openmediavault inherits the fixes, napalm-qnap-qts overrides install/uninstall.
Six bug fixes, one commit each.
- `fix(packages)`: `install_package` decides by the exit status; keywords only when there is none (#4). The return-type mismatch with device-types is tracked in NAPALM/napalm-device-types#36.
- `fix(vpn)`: the WireGuard peer key prefix is URL-safe (`+`→`-`, `/`→`_`), as in napalm-opnsense; affected peers get a new key once (#43).
- `fix(processes)`: `started` holds ps's whole five-word start time; `ps` runs under `LC_ALL=C` (#21).
- `fix(packages)`: packages in dpkg state `rc`/`n` are left out of apt's package list (#17).
- `fix(ping)`: BusyBox and iputils summaries, `round-trip` lines, IPv6 and link-local replies (#15).
- `fix(routes)`: IPv4 and IPv6 routes are read separately; the IPv6 default is `::/0`, an IPv6 host route `/128` (#6).
Parsers moved into small strict modules (`_dpkg.py`, `_ping.py`, `_routes.py`); `linux.py` shrank from 2265 to 2142 lines, the ratchet baseline only shrank. No public signature changed; napalm-openmediavault inherits the fixes, napalm-qnap-qts overrides install/uninstall.
Already fixed on main, no code touched: #26 (350e3a6), #19 and #10 (cf8ee38), #5 (60b56c3); #3 obsolete (get_docker_info removed in 3333d8e).
Tested: fixtures only. pytest 295 passed, ruff, mypy, `napalm-standard check`/`ratchet` green.
Closes #4
Closes #43
Closes #21
Closes #17
Closes #15
Closes #6
install_package searched the output of `... || true` for words such as
"failed", the pattern uninstall_package left behind for netork#267: a
postinst that only mentions a failure read as a failed install, and a
failure phrased without those words read as success. It now runs through
_sudo_status like the removal and falls back to the keywords only when
the channel gave no exit status.
The ruff findings named in the issue are gone since the driver adopted
the standard; strict mypy for linux.py is held by the quality ratchet,
and the None-vs-dict package contract is NAPALM/napalm-device-types#36.
Closes#4
get_vpn_tunnels keyed a peer as wireguard-<iface>-<pubkey[:8]>. Base64
uses "/" and "+", and the key is used as a URL path segment; a "/"
breaks the route even percent-encoded. The prefix now maps "+" to "-"
and "/" to "_", as napalm-opnsense does (NAPALM/napalm-opnsense#32).
Affected peers change their key once.
Closes#43
get_processes split each ps line into 11 parts, but lstart is five
words, so started held only the weekday and command began with the rest
of the date. The line is now split into 15 parts, started joins the five
date words and command is the remainder. ps runs under LC_ALL=C: only
there are the weekday and month one word each on every host.
Closes#21
dpkg-query -W also lists packages that were removed but whose
configuration dpkg keeps (state rc), and the driver marked every line
installed: old kernels and a removed agent showed up as installed
software. The query now asks for db:Status-Abbrev and drops packages
that are not installed or only left their configuration; held, unpacked
and half-configured packages keep counting, their files are on disk.
The dpkg query and its parse move to napalm_linux/_dpkg.py, a pure
function under strict mypy, which keeps linux.py inside its line count.
Closes#17
ping() only knew the iputils summary. BusyBox, the ping on Alpine,
writes "2 packets received", so every target came back as an error and
the ping sweep counted it as down. Its probe lines ("seq=") and every
IPv6 reply were dropped by an IPv4-only per-probe pattern, and its
"round-trip min/avg/max" line without a deviation was not read.
The parse moves to napalm_linux/_ping.py and accepts both summaries
(also iputils' with "+N errors"), both RTT lines, IPv6 and named
replies. The shared Unix ping parser is still open as
NAPALM/napalm-device-types#12.
Closes#15
get_route_to read "ip -4 route show && ip -6 route show" as one output
and mapped "default" to 0.0.0.0/0; the "default6" branch meant for IPv6
never matches, because ip -6 also prints "default". A dual-stack host
showed two 0.0.0.0/0 routes, one of them family ipv6. Each family is now
read with its own command, so "default" becomes ::/0 for IPv6 and a host
route without a prefix length a /128 there instead of a /32.
The line parse moves to napalm_linux/_routes.py.
Closes#6
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.
Six bug fixes, one commit each.
fix(packages):install_packagedecides by the exit status; keywords only when there is none (#4). The return-type mismatch with device-types is tracked in NAPALM/napalm-device-types#36.fix(vpn): the WireGuard peer key prefix is URL-safe (+→-,/→_), as in napalm-opnsense; affected peers get a new key once (#43).fix(processes):startedholds ps's whole five-word start time;psruns underLC_ALL=C(#21).fix(packages): packages in dpkg staterc/nare left out of apt's package list (#17).fix(ping): BusyBox and iputils summaries,round-triplines, IPv6 and link-local replies (#15).fix(routes): IPv4 and IPv6 routes are read separately; the IPv6 default is::/0, an IPv6 host route/128(#6).Parsers moved into small strict modules (
_dpkg.py,_ping.py,_routes.py);linux.pyshrank from 2265 to 2142 lines, the ratchet baseline only shrank. No public signature changed; napalm-openmediavault inherits the fixes, napalm-qnap-qts overrides install/uninstall.Already fixed on main, no code touched: #26 (
350e3a6), #19 and #10 (cf8ee38), #5 (60b56c3); #3 obsolete (get_docker_info removed in3333d8e).Tested: fixtures only. pytest 295 passed, ruff, mypy,
napalm-standard check/ratchetgreen.Closes #4
Closes #43
Closes #21
Closes #17
Closes #15
Closes #6
ping() only knew the iputils summary. BusyBox, the ping on Alpine, writes "2 packets received", so every target came back as an error and the ping sweep counted it as down. Its probe lines ("seq=") and every IPv6 reply were dropped by an IPv4-only per-probe pattern, and its "round-trip min/avg/max" line without a deviation was not read. The parse moves to napalm_linux/_ping.py and accepts both summaries (also iputils' with "+N errors"), both RTT lines, IPv6 and named replies. The shared Unix ping parser is still open as NAPALM/napalm-device-types#12. Closes #15