fix: switch fingerprints, request timeouts, ping (#4, #3, #2) #12

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

Three bug fixes, one commit each.

  • fix(fingerprint): the GS1920 and GS2210 switch patterns are dropped; a Zyxel switch page no longer scores as this gateway (#4).
  • fix(http): every get/post/put passes timeout=self.timeout; the ignored session.timeout attribute is gone (#3).
  • fix(ping): the device's answer to PINGTEST is only an acknowledgement, with no reply count or RTT. The driver now sets SUPPORTS_PING = False and ping() returns an error without contacting the gateway, so sweeps no longer report every target alive (#2). ping can be rebuilt once the PINGTEST result object is recorded.

Tested: fixtures only. pytest 40 passed, ruff, mypy, napalm-standard check/ratchet green.

Closes #4
Closes #3
Closes #2

Three bug fixes, one commit each. - `fix(fingerprint)`: the GS1920 and GS2210 switch patterns are dropped; a Zyxel switch page no longer scores as this gateway (#4). - `fix(http)`: every get/post/put passes `timeout=self.timeout`; the ignored `session.timeout` attribute is gone (#3). - `fix(ping)`: the device's answer to `PINGTEST` is only an acknowledgement, with no reply count or RTT. The driver now sets `SUPPORTS_PING = False` and `ping()` returns an error without contacting the gateway, so sweeps no longer report every target alive (#2). `ping` can be rebuilt once the PINGTEST result object is recorded. Tested: fixtures only. pytest 40 passed, ruff, mypy, `napalm-standard check`/`ratchet` green. Closes #4 Closes #3 Closes #2
christianmanivong added 3 commits 2026-11-01 20:58:00 +00:00
GS1920 and GS2210 are Zyxel switches. Counting them as evidence for a
VMG gateway driver made discovery score a Zyxel switch higher for this
driver than a real VMG gateway.

Closes #4
requests ignores a timeout attribute on a Session, so open() setting
one left every call without a timeout and an unresponsive gateway
could hang a worker indefinitely. Each get/post/put now carries the
driver's timeout.

Closes #3
fix(ping): stop reporting every target alive
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m13s
driver / test (3.12) (pull_request) Successful in 4m9s
driver / test (3.13) (pull_request) Successful in 4m1s
driver / lowest (pull_request) Successful in 3m33s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 5m49s
driver / publish (pull_request) Skipped
fcee6d7ddd
ping() returned three replies of 0 ms whenever the DAL accepted a
PINGTEST request, without reading any result, so a LAN scan through
this gateway marked every address alive. The DAL answer is only an
acknowledgement with no reply count, so ping() now returns NAPALM's
error reply without contacting the gateway and the driver opts out of
ping sweeps with SUPPORTS_PING = False.

Closes #2
christianmanivong merged commit f6b3887121 into main 2026-11-01 22:00:49 +00:00
christianmanivong deleted branch fix/bugs-2026-11 2026-11-01 22:00:49 +00:00
Sign in to join this conversation.