driver / standard (pull_request) Failing after 17s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 57s
driver / test (3.13) (pull_request) Successful in 52s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m4s
CI / driver (pull_request) Failing after 2m32s
driver / publish (pull_request) Skipped
Over SSH the name went into `name "<name>"` in config mode, one line of a block sent line by line before `write memory`: a line break ended the line and the switch ran the rest as commands, a double quote ended the name. netOrk replays VLAN names other devices reported here (NetOrk/netork#2455). set_vlan() now raises ValueError for a name containing \r, \n or ", before anything is sent, over every transport.
7.9 KiB
7.9 KiB
Changelog
All notable changes to this driver. The format follows Keep a Changelog, versions follow Semantic Versioning.
[Unreleased]
Added
get_time_sync()andconfigure_time_sync()through napalm-device-types'TimeSyncMixin(4.35.0, NetOrk/netork#2366). The read takes the switch's time lines fromshow running-config(over REST through the/cliendpoint): the SNTP servers by priority, or thentp serverlines on a switch runningtimesync ntp; the zone reads asNone, since the switch keeps minutes and a summer-time rule, not a name. A write puts the servers in the protocol the switch runs, at most 3 SNTP or 8 NTP servers, IP addresses only, and turns a switch on TimeP or no protocol totimesync sntpandsntp unicast. Servers already in place from the first one on are kept, the rest replaced. An IANA zone is written astime timezone <minutes>and atime daylight-time-rulefrom its POSIX rule: the US and EU dates as the switch's own rules, other Sunday rules asuser-defineddates; a zone the switch cannot keep (half an hour of summer time, a change on a weekday other than Sunday) is refused before anything is sent. A change is saved withwrite memory; what the switch already has is not sent again. Over REST the writes run on a temporary SSH session, asconfigure_snmp_agentdoes.
Changed
- Needs napalm-device-types 4.35.0.
get_ntp_servers()lists the configured servers asget_time_sync()reads them, over every transport. Over SSH it took every IPv4 address inshow ntp associations(orshow timesync), over REST thentp/serverresource.get_ntp_stats()is unchanged.- The floor on napalm-device-types is 4.23.0, the first release with what this driver uses.
ssl_verify(verify_ssl,verify) no longer has any effect: the REST certificate is verified by its fingerprint instead. Callers that set it toTruehad their login retried without verification whenever the self-signed certificate failed the CA check.- Python 3.12 is the floor (
requires-python = ">=3.12"): netOrk runs every driver on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6). - The floor on napalm is 5.1: older releases import
pkg_resources, which a Python 3.12 venv no longer has. - The floor on urllib3 is 1.26.5: older releases bundle a
sixthat Python 3.12 cannot import. - The floor on netmiko is 4.3.0: the Telnet login reads the switch's greeting through a session log object, which older releases do not accept.
Fixed
set_vlan()refuses a name with a line break or a double quote (ValueError), over every transport, before anything is sent (#28, NetOrk/netork#2455). Over SSH the name went intoname "<name>"in config mode: a line break ended that line and the switch ran the rest as commands, thenwrite memory.- The REST API's certificate is verified. A switch's self-signed certificate is checked
by its SHA-256 fingerprint, not by a CA, with trust on first use:
optional_args["tls_fingerprints"]({"443": "SHA256:AB:CD:…"}) holds the fingerprint to expect andoptional_args["tls_certificate_observer"]receives every one seen. A different certificate is refused before the password is sent and endsopen()withTlsCertificateMismatch(aConnectionExceptionnaming both fingerprints); the driver does not fall back to SSH or Telnet then. Every connection of the REST session is held to the certificate checked (#17). - A REST login that failed is no longer retried with certificate verification turned off.
- A switch whose certificate is pinned is not logged in to over plain HTTP: when only HTTP answers, the REST API is skipped and the CLI transports are tried. Blocking port 443 would otherwise downgrade the login to clear text. Without a pin, plain HTTP is used as before (#17).
cli()over the REST API returns the command's output. It returned the API's base64 encoding of it as it came, NUL byte included.configure_snmp_agentover the REST API opens its temporary SSH session on port 22. It usedoptional_args["port"], which names the REST API's port when REST is the transport, so the SNMP setup failed on switches managed over REST.- A switch whose Telnet sessions are all taken is reported as such ("the switch has no free session"), as a connection error. It was reported as an authentication failure, which pointed at the password.
- A REST API that answers the login with an HTML page is reported as "answered with a web page instead of JSON", not as a failed login.
- An SSH attempt that failed for another reason than a timeout, such as no common key exchange algorithm, names that reason instead of "timed out".
get_snmp_configreads the switch's communities over the REST API too. It returnedNonethere, so a switch managed over REST always read as having no SNMP. A read that fails now raises instead of reading as "no SNMP" (REST transport).- A failed read over the REST API raises instead of reading as an empty switch (#22).
A timeout, a refused session or an HTTP error made
get_facts,get_interfaces,get_interfaces_ip,get_vlans,get_arp_table,get_mac_address_table,get_lldp_neighbors(_detail),get_ntp_serversandget_poe_statusanswer with no hostname, ports, VLANs or neighbours. They now raiseConnectionExceptionwhen the switch does not answer or refuses the session (HTTP 401/403) andRuntimeErrorfor any other HTTP error. A resource that some firmware or configurations do not have (HTTP 404) is left out as before: the DNS domain, port speeds, a VLAN's IPv4 address, PoE on a switch without it. get_configraises when neither the REST API nor the SSH fallback could read the configuration. It returned an empty running configuration.get_configon a switch whose REST API has no configuration (2530 / YA series) reads over SSH whatretrieveasks for, the startup configuration included (#25). That fallback read the running configuration only, whatever was asked, and reported the startup configuration as empty.cli()over the REST API raises when the request fails. It returned"Error: HTTP <status>"as if that were the command's output.
[0.6.0] - 2026-10-23
The first release on PyPI.
Changed
- The driver follows the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, mypy, the
tests on Python 3.10–3.13 and at the lowest declared versions, bandit, pip-audit and
a build check, and a release tag publishes to PyPI. The package now ships
py.typedand a LICENSE file. Python 3.8 and 3.9 are no longer supported; napalm-device-types never ran on them. It now requires napalm-device-types 4.21.1. - Exceptions the driver deliberately ignores (logging out of the REST API, the extra port lookup, per-port details, closing a session) are now logged at debug level.
[0.5.0] - 2026-10-18
Changed
- The SSH host key is verified: with a known key in
optional_args["ssh_host_keys"]any other key is refused before login, and every key seen is reported tooptional_args["ssh_host_key_observer"]. Without either argument the driver connects as before. Requires napalm-device-types 4.19.0.
[0.4.0] - 2026-10-17
Added
configure_snmp_agent(): community (read-only), contact and location from the caller, saved and verified inshow snmp-server.
Removed
- Breaking:
fix_snmpandrun_device_action;fix_snmpset the communitypublic.
[0.3.0] - 2026-10-16
Changed
- The driver no longer collects over SNMP:
SNMP_HEALTH_PROFILEdeclares where the switch publishes its health values. The memory value is read as free memory, as the switch reports it, and interface counters come from the 64-bit ifXTable.
[0.2.0] - 2026-05-29
Added
- First version: ProCurve and Aruba switches over the REST API, SSH, SSH with legacy key exchange or Telnet, chosen automatically.