fix(interfaces): read interfaces and addresses from the gateway's status page
driver / standard (pull_request) Failing after 15s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 59s
driver / test (3.13) (pull_request) Successful in 52s
driver / test (3.12) (pull_request) Successful in 56s
driver / lowest (pull_request) Successful in 25s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 54s
CI / driver (pull_request) Failing after 2m1s
driver / publish (pull_request) Skipped

get_interfaces reported a fixed set: wan, lan and two Wi-Fi radios, all
up at 1000 Mbit/s, the LAN with the WAN's MAC. get_interfaces_ip gave
both a /24, the LAN's address being the hostname the driver connected
to. getBasicInformation carries none of WanIp, LanIp or MacAddress on a
VMG4005-B50A, a VDSL bridge without Wi-Fi whose LAN is a /29, and the
gateway showed all of the invented values.

Both now read the DAL's cardpage_status, which a GET answers sealed like
a PUT: the IP interfaces in WanLanInfo (br0, atm0.1, ptm0.2) with their
status, MAC and netmask, the Ethernet ports in LanInfo (eth1) with their
speed. A speed or MTU the gateway does not report is 0, unknown. IPv6
addresses are not read yet: no gateway seen so far had IPv6 on.
This commit is contained in:
Christian Manivong committed 2026-11-12 16:14:25 +01:00
1 parent 63f92561eb
commit ec76c1d6e8
4 files changed
+262 -56

No files matched your search

-4
View File
@@ -140,10 +140,6 @@ def test_a_gateway_that_lists_no_hosts_has_none():
assert driver.get_hosts() == []
def test_get_facts_lists_the_interfaces():
assert _driver({}).get_facts()["interface_list"] == ["wan", "lan", "wlan_2_4ghz", "wlan_5ghz"]
def test_get_facts_raises_when_the_interfaces_cannot_be_read():
driver = _driver({})
driver.get_interfaces = MagicMock(side_effect=RuntimeError("no interfaces"))