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.
This commit is contained in:
Christian Manivong committed 2026-11-12 16:42:47 +01:00
1 parent ca67c08736
commit 61a6e4f7ba
5 files changed
+149 -5

No files matched your search

+3 -1
View File
@@ -161,7 +161,9 @@ def test_a_gateway_without_wifi_has_no_wifi_interfaces():
def test_get_facts_lists_the_gateways_interfaces():
names = _driver(CARDPAGE).get_facts()["interface_list"]
driver = _driver(CARDPAGE)
driver._system_name = lambda: ("VMG4005-B50A", "home") # type: ignore[method-assign] # test_facts.py
names = driver.get_facts()["interface_list"]
assert sorted(names) == ["atm0.1", "br0", "eth1", "ptm0.2"]