A GET of the DAL answers sealed ({"content", "iv"}), like a PUT does.
_read_dal_or_page parsed the envelope as it came, so hosts, the ARP
table, port forwards and the Wi-Fi getters found nothing on every
gateway, and since nothing raised the HTML fallback never ran either.
Every DAL GET now goes through one helper that decrypts the answer,
checks for ZCFG_SUCCESS and returns its Object list; the status page
and the System page share the decryption. Hosts are read from
lanhosts and port forwards from nat, the names the gateway's web
interface uses: LAN_HOSTS and NAT_PORTMAP are answered like any
unknown name, with an empty Object. The new parsers live in
napalm_zyxel/parsers.py, under strict mypy.
Tests seal recorded, anonymised answers of a VMG4005-B50A
(V5.17(ABQA.3.1)C0) with a real ZyxelCrypto, so the driver decrypts
them. The Wi-Fi DAL names stay unverified: that gateway has no Wi-Fi.
Closes #25
11 lines
181 B
JSON
11 lines
181 B
JSON
{
|
|
"coverage_floor": 68.0,
|
|
"function_complexity": {},
|
|
"function_lines": {},
|
|
"mypy_relaxed": [
|
|
"napalm_zyxel.zyxel_driver"
|
|
],
|
|
"python_file_lines": {},
|
|
"untyped_public": []
|
|
}
|