fix(facts): read the host name from the gateway's System page #26

Merged
christianmanivong merged 1 commits from fix/hostname-from-system-page into main 2026-11-12 15:46:07 +00:00
Owner

get_facts read HostName from getBasicInformation, which a VMG4005-B50A (V5.17(ABQA.3.1)C0) does not send, and fell back to the address the driver connects to. netOrk ignores an IP as a host name, so the gateway stayed named 192.168.1.1.

The gateway's own Maintenance > System page reads host name and domain with GET /cgi-bin/System?oid=snmp (the oid name is Zyxel's; this firmware has no SNMP agent), sealed like a DAL answer. get_facts now reads them there:

  • hostname: HostName from that page
  • fqdn: HostName.DomainName, or the host name alone without a domain
  • no name set: "", not the address
  • the page cannot be read: get_facts raises, like the interfaces since #15

Checked read-only against the gateway with this branch: hostname: VMG4005-B50A, fqdn: VMG4005-B50A.home.

Tests: tests/test_facts.py with that gateway's real answers; 88 passed, ruff, mypy and the standard's ratchet clean, coverage 76 %.

`get_facts` read `HostName` from `getBasicInformation`, which a VMG4005-B50A (V5.17(ABQA.3.1)C0) does not send, and fell back to the address the driver connects to. netOrk ignores an IP as a host name, so the gateway stayed named `192.168.1.1`. The gateway's own Maintenance > System page reads host name and domain with `GET /cgi-bin/System?oid=snmp` (the oid name is Zyxel's; this firmware has no SNMP agent), sealed like a DAL answer. `get_facts` now reads them there: - `hostname`: `HostName` from that page - `fqdn`: `HostName.DomainName`, or the host name alone without a domain - no name set: `""`, not the address - the page cannot be read: `get_facts` raises, like the interfaces since #15 Checked read-only against the gateway with this branch: `hostname: VMG4005-B50A`, `fqdn: VMG4005-B50A.home`. Tests: `tests/test_facts.py` with that gateway's real answers; 88 passed, ruff, mypy and the standard's ratchet clean, coverage 76 %.
christianmanivong added 1 commit 2026-11-12 15:42:59 +00:00
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
61a6e4f7ba
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.
christianmanivong merged commit 56a832b9d1 into main 2026-11-12 15:46:07 +00:00
christianmanivong deleted branch fix/hostname-from-system-page 2026-11-12 15:46:07 +00:00
Sign in to join this conversation.