fix: WAN speed in Mbit/s, time zone name (#2, #3) #10

Merged
christianmanivong merged 3 commits from fix/bugs-2026-11 into main 2026-11-01 22:00:38 +00:00
Owner

Two bug fixes, one commit each.

  • fix(interfaces): the WAN interface speed is reported in Mbit/s (NewLayer1DownstreamMaxBitRate is bit/s; it was divided by 1000, giving kbit/s) (#2). get_wan_status's max_bitrate_* stay in kbit/s, as device-types defines them.

  • fix(system): timezone comes from NewLocalTimeZoneName, not the current local time (part of #3).

  • docs(system): firmware_version keeps its name and is documented as the version on offer (empty when none; the running version is get_facts()["os_version"]), in the docstring and a new README section (rest of #3).

Tested: fixtures only, run with no network (unshare -rn) — the suite otherwise opens a real socket through NAPALM's __del__ → is_alive() (separate test fix). pytest 74 passed, ruff, mypy, napalm-standard check/ratchet green.

Closes #2
Closes #3

Two bug fixes, one commit each. - `fix(interfaces)`: the WAN interface speed is reported in Mbit/s (`NewLayer1DownstreamMaxBitRate` is bit/s; it was divided by 1000, giving kbit/s) (#2). `get_wan_status`'s `max_bitrate_*` stay in kbit/s, as device-types defines them. - `fix(system)`: `timezone` comes from `NewLocalTimeZoneName`, not the current local time (part of #3). - `docs(system)`: `firmware_version` keeps its name and is documented as the version *on offer* (empty when none; the running version is `get_facts()["os_version"]`), in the docstring and a new README section (rest of #3). Tested: fixtures only, run with no network (`unshare -rn`) — the suite otherwise opens a real socket through NAPALM's `__del__` → `is_alive()` (separate test fix). pytest 74 passed, ruff, mypy, `napalm-standard check`/`ratchet` green. Closes #2 Closes #3
christianmanivong added 2 commits 2026-11-01 20:57:58 +00:00
NewLayer1DownstreamMaxBitRate is bit/s; dividing by 1000 gave kbit/s,
so a 250 Mbit/s line came out as 250000 in a field NAPALM defines as
Mbit/s.

Closes #2
fix(system): report the time zone, not the current time
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 59s
driver / test (3.13) (pull_request) Successful in 6m8s
driver / test (3.12) (pull_request) Successful in 6m19s
driver / lowest (pull_request) Successful in 5m43s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 7m50s
driver / publish (pull_request) Skipped
245c2f030c
Time1.GetInfo's NewCurrentLocalTime is the box's clock, so `timezone`
held a timestamp that changed on every poll. NewLocalTimeZoneName is
the zone the box is set to.

The other half of the issue, firmware_version being the version on
offer, stays open: the field is documented and consumed that way.

Refs #3
christianmanivong added 1 commit 2026-11-01 21:10:45 +00:00
docs(system): firmware_version is the version on offer
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 6m21s
driver / test (3.13) (pull_request) Successful in 6m13s
driver / lowest (pull_request) Successful in 5m44s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Successful in 8m6s
driver / publish (pull_request) Skipped
94fa378796
get_system_config()'s firmware_version reads NewX_AVM-DE_Version, the
firmware the box offers as an update, empty when it offers none, not the
version running (get_facts()["os_version"]). The name stays; the README
and the docstring now say what it holds, and that a box answering only
UserInterface1.GetInfo reports firmware_update_available without it.
No behaviour change.

Closes #3
christianmanivong merged commit 75d4257793 into main 2026-11-01 22:00:38 +00:00
christianmanivong deleted branch fix/bugs-2026-11 2026-11-01 22:00:38 +00:00
Sign in to join this conversation.