Files
Christian Manivong 51b8cda3e4
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 42s
driver / test (3.10) (pull_request) Successful in 3m25s
driver / test (3.11) (pull_request) Successful in 3m23s
driver / test (3.12) (pull_request) Successful in 3m25s
driver / test (3.13) (pull_request) Successful in 3m19s
driver / lowest (pull_request) Successful in 3m7s
driver / security (pull_request) Successful in 53s
driver / build (pull_request) Successful in 34s
CI / driver (pull_request) Successful in 19m12s
driver / publish (pull_request) Skipped
chore: adopt the NAPALM driver standard
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; .github/ is gone.
- requires-python >=3.10 (napalm-device-types needs it), floor
  napalm-device-types>=4.21.1 (was napalm_device_types>=0.4.0), LICENSE
  file, py.typed, SPDX license string, links to git.netork.io, a dev extra
  with floors.
- README (pyproject named one that did not exist) and CHANGELOG.md.
- mypy strict for the package; napalm_zyxel.zyxel_driver is exempt for now
  (24 errors), recorded in the quality baseline with its two complex
  functions. Coverage floor 68 % (measured 68.97 %).

Closes #8
2026-10-23 08:40:47 +02:00

69 lines
2.2 KiB
Markdown

# napalm-zyxel
NAPALM driver for Zyxel VMG series residential gateways (VMG4005-B50A and similar), built on
[napalm-device-types](https://git.netork.io/NAPALM/napalm-device-types)
(`ResidentialGatewayDriver`).
## Tested against
| Model | Firmware |
|---|---|
| not recorded yet | not recorded yet |
## Connection
The gateway's web API (the Zyxel DAL protocol) over HTTP on port 80, or HTTPS on port 443
with `use_tls`. The driver fetches the gateway's RSA public key, sends a fresh AES key
encrypted with it, and logs in with the web interface account; every request and response
after that is AES-encrypted.
```python
from napalm import get_network_driver
driver = get_network_driver("zyxel")
with driver("192.0.2.1", "admin", "secret", optional_args={"use_tls": True}) as device:
print(device.get_facts())
```
| Optional argument | Default | Meaning |
|---|---|---|
| `use_tls` | `False` | HTTPS instead of HTTP |
| `port` | `443` with `use_tls`, else `80` | port of the web interface |
| `verify` | `False` | verify the gateway's TLS certificate |
## Supported
| Getter / action | Source |
|---|---|
| `get_facts` | basic device information |
| `get_interfaces`, `get_interfaces_ip` | basic device information (WAN, LAN, Wi-Fi) |
| `get_arp_table` | derived from the active LAN hosts |
| `get_wan_status` | basic device information |
| `get_hosts` | DAL `LAN_HOSTS`, else the DHCP page |
| `get_port_forwards`, `get_nat_translations` | DAL `NAT_PORTMAP`, else the status page |
| `get_wireless_clients`, `get_ssids`, `get_radio_status` | DAL, else the wireless page |
| `get_diagnostics` | DAL `DIAGNOSTICS` |
| `ping` | DAL `PINGTEST` |
| `is_alive` | TCP connect to the web port |
| `reboot_host` | DAL `REBOOT` |
| `restart_wifi` | DAL `WIFI_RESTART` |
## Not supported
Configuration changes (`load_merge_candidate` and `load_replace_candidate` raise
`NotImplementedError`), `get_config`, LLDP, BGP, NTP, SNMP, users, routes, MAC address
table, optics, environment, traceroute, VPN tunnels and the CLI.
## Development
The rules are in [STANDARDS.md](https://git.netork.io/NAPALM/driver-standard/src/branch/main/STANDARDS.md).
```bash
python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest --cov
```
## License
Apache-2.0