- 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
- nosec for SHA512_password in the login payload (B105): it is a flag
telling the gateway how Input_Passwd is encoded, not a password; a false
positive.
- A failed login raises ConnectionException from the underlying error, so
the cause stays attached.
- tests: pytest.raises instead of try / assert False / except, which
python -O would have turned into tests that always pass.
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff
cannot fix comes in the next commit.
The gateway had reboot(), but the contract (HostRebootMixin) and the
application look for reboot_host(), so the gateway could not be
restarted from it. reboot_host() returns None and raises when the
gateway refuses, as the contract says.
run_device_action dispatched reboot, restart_wifi[:band] and
get_diagnostics by string, with a result shape other than its
contract's. restart_wifi(band) and get_diagnostics() are methods now;
napalm-device-types deprecates run_device_action.
BREAKING CHANGE: reboot() and run_device_action are removed.
Closes#5. Part of #6.
The same job as napalm-fritzbox and napalm-opnsense: Python 3.10, 3.11 and
3.12, pytest, then wheel and sdist. napalm-device-types comes from
git.netork.io first, because PyPI has an unrelated package of that name.