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
2.2 KiB
2.2 KiB
Changelog
All notable changes to napalm-openwrt. The format follows Keep a Changelog, versions follow Semantic Versioning. Versions up to 0.6.0 were not recorded here; their history is the git log.
[Unreleased]
Changed
- Python 3.12 is the floor (
requires-python = ">=3.12"): netOrk runs every driver on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6). - The floor on napalm is 5.1: older releases import
pkg_resources, which a Python 3.12 venv no longer has.
Fixed
get_arp_table()reports an unknown age as-1.0(napalm-device-types'ARP_AGE_UNKNOWN) instead of0.0, which means "confirmed just now": neitherip neighnor/proc/net/arphas an age (NetOrk/netork#1327).- The driver no longer removes
portfrom theoptional_argsdict it is given: the caller's dict stays as it was (#19). manage_service()reports a failed action or a missing init script as failed: only the init script's exit status decides, where any action used to come back as a success (#3).apply_updates()reports a failed upgrade as failed, with the package manager's exit status inerror; it used to report every upgrade as done (#11).get_environment()reports the CPU usage of the last second, from two reads of/proc/statone second apart; it used to report the average since boot, so a box busy for the last minute could show a low figure (#10).
[0.7.0] - 2026-10-23
The first release on PyPI.
Changed
- The driver follows the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, mypy, the
tests on Python 3.10–3.13 and at the lowest declared versions, bandit, pip-audit and
a build check, and a release tag publishes to PyPI. The package now ships
py.typedand a LICENSE file. Python 3.8 and 3.9 are no longer supported; napalm-device-types never ran on them. - napalm-device-types 4.21.1 or newer is required.
- Exceptions the driver deliberately ignores (the snmpd community in
get_snmp_config(), the network VLANs inget_ssids()) are now logged at debug level. - The project links point at git.netork.io instead of GitHub.