Commit Graph
4 Commits
Author SHA1 Message Date
Christian Manivong b6668eddbd test(facts): check get_facts against the gateway's recorded answers (#24)
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 2m35s
driver / publish (pull_request) Skipped
get_facts read SerialNumber, HostName, SystemUpTime and MacAddress
from getBasicInformation, which a VMG4005-B50A (V5.17(ABQA.3.1)C0)
answers with model, firmware and language settings only. The code
was fixed by #26 (host name and domain from the System page) and #28
(serial number and uptime from cardpage_status); the tests still fed
it an invented getBasicInformation (MOCK_BASIC_INFO) that carried
those fields, with an invented serial number and firmware.

MOCK_BASIC_INFO is now the recorded answer, and a new test reads the
facts from the recorded, sealed status page and the System page: it
fails against the driver before #26 with the symptoms of this issue
(serial "", uptime 0, host name the connection address). The README
names the sources get_facts reads.

Closes #24
2026-11-12 19:06:53 +01:00
Christian Manivong a282836bd2 test: placeholders for the serial number and MAC addresses in fixtures
driver / lint (pull_request) Successful in 16s
driver / standard (pull_request) Successful in 18s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 57s
driver / test (3.12) (pull_request) Successful in 1m13s
driver / lowest (pull_request) Successful in 27s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Successful in 2m28s
driver / publish (pull_request) Skipped
The fixtures are a real gateway's answers. Its serial number and its MAC
addresses identify that one device and do not belong in a public
repository; the tests only need values of the right shape. The MACs keep
Zyxel's OUI.
2026-11-12 18:32:40 +01:00
Christian Manivong 1fda222d56 fix(facts): read serial number and uptime from the status page
driver / lint (pull_request) Successful in 20s
driver / standard (pull_request) Successful in 20s
driver / types (pull_request) Successful in 1m8s
driver / test (3.13) (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / lowest (pull_request) Successful in 26s
driver / build (pull_request) Successful in 36s
driver / security (pull_request) Successful in 1m5s
CI / driver (pull_request) Successful in 2m23s
driver / publish (pull_request) Skipped
get_facts read SerialNumber and SystemUpTime from getBasicInformation,
which a VMG4005-B50A does not send, and reported "" and 0. The gateway
has both in DeviceInfo of the DAL's cardpage_status, the answer the
interfaces are read from. get_facts now reads that answer once and takes
the interfaces, serial number and uptime from it. Model and firmware stay
with getBasicInformation, which does carry them.

Closes #27
2026-11-12 17:19:08 +01:00
Christian Manivong 61a6e4f7ba fix(facts): read the host name from the gateway's System page
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 1m8s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / test (3.12) (pull_request) Successful in 1m5s
driver / lowest (pull_request) Successful in 25s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m15s
CI / driver (pull_request) Successful in 2m37s
driver / publish (pull_request) Skipped
get_facts read HostName from getBasicInformation, which a VMG4005-B50A
does not send, and fell back to the address the driver connects to:
netOrk kept the gateway named 192.168.1.1. The gateway's own System page
reads host name and domain with GET /cgi-bin/System?oid=snmp, sealed like
a DAL answer; get_facts now reads them there. fqdn is the host name with
its domain. A gateway with no name set reports "", and get_facts raises
when the System page cannot be read.
2026-11-12 16:42:47 +01:00