A switch whose Telnet sessions were all taken, and a REST API answering
the login with the web UI's HTML page, were both reported as an
authentication failure, which sent the operator after the password. The
Telnet login now keeps the switch's greeting in an in-memory session log
and reports a full switch as a connection error; an HTML answer to the
REST login says so. An SSH attempt records netmiko's underlying error
instead of "timed out" when it was not a timeout.
Session log objects need netmiko 4.3.0, which becomes the floor.
Closes#13
netOrk runs every driver in its own containers on Python 3.12, so 3.10
and 3.11 are no longer supported or tested. requires-python, mypy and
ruff move to 3.12, along with what ruff's pyupgrade rules then rewrite.
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
of NAPALM/driver-standard; .github/ goes.
- requires-python >=3.10 (napalm-device-types needs it), LICENSE file,
CHANGELOG, py.typed, SPDX license string, links to git.netork.io;
napalm-device-types >=4.21.1, a dev extra with floors.
- [tool.napalm-standard] names the import package napalm_procurve, which is
not the distribution name.
- True floors for netaddr (>=0.7.10) and urllib3 (>=1.23): unbounded, the
lowest job installed versions that do not import on Python 3.10.
- mypy strict for the package; napalm_procurve.api_client, .parsers and
.procurve are exempt for now (136 errors), recorded in the quality
baseline with their long functions and the 1400-line procurve.py.
Coverage floor 54 % (measured 54.28 %).
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 driver accepted any SSH host key. It now verifies through
napalm-device-types' HostKeyCheck (>= 4.19.0): with a known key in
optional_args["ssh_host_keys"] any other key is refused before login, and
every key seen is reported to optional_args["ssh_host_key_observer"].
Without either argument it connects as before (first use).
pyproject.toml did not list napalm-device-types although the code
imports it (CI installed it by hand); it now requires 4.13, whose fix
templates the next commit uses. Seven .pyc and six egg-info files were
tracked; they go, and a .gitignore keeps them out.
Closes#11
The driver no longer collects over SNMP. SNMP_HEALTH_PROFILE states
where the switch publishes its values; the application polls and
computes (napalm-device-types docs/STRUCTURE.md).
This also fixes the memory figure: NETSWITCH-MIB hpLocalMemEntry column
6 is free memory, not used. On swt-l0-3-40 total 58720256 = free
39105640 + allocated 19614616, so the switch showed 66.6 % used instead
of 33.4 %. The profile names column 6 as free.
Interface counters now come from the 64-bit ifXTable where the switch
has it, as the application reads them for every device.
Closes#9