fix(driver): __init__ works on a copy of the caller's optional_args (#19).
fix(services): manage_service reports the command's exit status, not unconditional success (#3).
fix(updates): apply_updates likewise; a non-zero or missing status gives success: False plus error (#11).
fix(environment): CPU usage is the difference of two /proc/stat reads a second apart, not the average since boot (#10).
fix(lldp): several neighbours on one port stay separate; a neighbour ends where the next one starts (#9). The fixture is built from lldpd's output layout (display.c/kv_writer.c), not recorded from a device.
fix(lldp): the LLDP getters only read (lldpctl -f keyvalue); they no longer enable/start lldpd or rewrite its interface list (#8). Behaviour change: a device whose lldpd is stopped shows no neighbours until something starts it. Where lldpd setup moves to (netOrk via ensure_package + manage_service, and a device-types template for the interface list) is still open — do not merge this commit before that is decided.
#12 was already fixed by 968d658 (install_auc removed; installs go through install_package, which branches on apk/opkg).
Six bug fixes, one commit each.
- `fix(driver)`: `__init__` works on a copy of the caller's `optional_args` (#19).
- `fix(services)`: `manage_service` reports the command's exit status, not unconditional success (#3).
- `fix(updates)`: `apply_updates` likewise; a non-zero or missing status gives `success: False` plus `error` (#11).
- `fix(environment)`: CPU usage is the difference of two `/proc/stat` reads a second apart, not the average since boot (#10).
- `fix(lldp)`: several neighbours on one port stay separate; a neighbour ends where the next one starts (#9). The fixture is built from lldpd's output layout (`display.c`/`kv_writer.c`), not recorded from a device.
- `fix(lldp)`: the LLDP getters only read (`lldpctl -f keyvalue`); they no longer enable/start lldpd or rewrite its interface list (#8). **Behaviour change:** a device whose lldpd is stopped shows no neighbours until something starts it. Where lldpd setup moves to (netOrk via `ensure_package` + `manage_service`, and a device-types template for the interface list) is still open — do not merge this commit before that is decided.
#12 was already fixed by 968d658 (install_auc removed; installs go through `install_package`, which branches on apk/opkg).
Tested: fixtures only. pytest 217 passed, ruff, mypy, `napalm-standard check`/`ratchet` green.
Closes #19
Closes #3
Closes #11
Closes #10
Closes #9
Closes #8
manage_service returned success for every action, so a failed start or
a missing init script showed up as done. The command now prints its
exit status after a marker, and only that status decides.
Closes#3
apply_updates ran apk/opkg upgrade and returned success whatever
happened, so a failed upgrade was reported as done. The command now
prints its exit status after the marker get_available_updates already
uses; a non-zero or missing status is a failure, named in "error".
Closes#11
get_environment promised two samples one second apart but read
/proc/stat once, so the figure was the average since boot: a box at
100 % for the last minute showed its lifetime average. It now reads the
cpu line twice, a second apart, and uses the difference.
Closes#10
The keyvalue output was grouped by local interface only, so with several
neighbours on one port their keys overwrote each other and one mixed
entry came back. A neighbour now ends where the next one opens (alias,
then via, as lldpd prints it); a key repeated inside one neighbour, such
as one mgmt-ip per address, does not start a new one.
Closes#9
get_lldp_neighbors, which a poll calls every time, enabled and started a
stopped lldpd and rewrote lldpd's interface list with uci, restarting
the daemon. A getter must not change the device. Both LLDP getters now
only run lldpctl; installing and starting lldpd are ensure_package and
manage_service.
Closes#8
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(driver):__init__works on a copy of the caller'soptional_args(#19).fix(services):manage_servicereports the command's exit status, not unconditional success (#3).fix(updates):apply_updateslikewise; a non-zero or missing status givessuccess: Falsepluserror(#11).fix(environment): CPU usage is the difference of two/proc/statreads a second apart, not the average since boot (#10).fix(lldp): several neighbours on one port stay separate; a neighbour ends where the next one starts (#9). The fixture is built from lldpd's output layout (display.c/kv_writer.c), not recorded from a device.fix(lldp): the LLDP getters only read (lldpctl -f keyvalue); they no longer enable/start lldpd or rewrite its interface list (#8). Behaviour change: a device whose lldpd is stopped shows no neighbours until something starts it. Where lldpd setup moves to (netOrk viaensure_package+manage_service, and a device-types template for the interface list) is still open — do not merge this commit before that is decided.#12 was already fixed by
968d658(install_auc removed; installs go throughinstall_package, which branches on apk/opkg).Tested: fixtures only. pytest 217 passed, ruff, mypy,
napalm-standard check/ratchetgreen.Closes #19
Closes #3
Closes #11
Closes #10
Closes #9
Closes #8