driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Failing after 17s
driver / types (pull_request) Successful in 1m2s
driver / test (3.13) (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 1m3s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m8s
CI / driver (pull_request) Failing after 2m21s
driver / publish (pull_request) Skipped
Over SSH the description went into ` name "<desc>"` under `interface <port>`, one line of a block sent line by line before `write memory`: a line break ran the rest as commands, a double quote ended the value. It is the same injection as set_vlan's name (NetOrk/netork#2455). set_interface() now raises ValueError for a description containing \r, \n or ", before anything is sent, over every transport, through the same check as set_vlan (_check_cli_value). The tests move to test_cli_values.py, which covers both.
139 lines
7.9 KiB
Markdown
139 lines
7.9 KiB
Markdown
# Changelog
|
||
|
||
All notable changes to this driver. The format follows
|
||
[Keep a Changelog](https://keepachangelog.com/), versions follow
|
||
[Semantic Versioning](https://semver.org/).
|
||
|
||
## [Unreleased]
|
||
|
||
### Added
|
||
- `get_time_sync()` and `configure_time_sync()` through napalm-device-types'
|
||
`TimeSyncMixin` (4.35.0, NetOrk/netork#2366). The read takes the switch's time lines
|
||
from `show running-config` (over REST through the `/cli` endpoint): the SNTP servers
|
||
by priority, or the `ntp server` lines on a switch running `timesync ntp`; the zone
|
||
reads as `None`, 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 to `timesync
|
||
sntp` and `sntp unicast`. Servers already in place from the first one on are kept,
|
||
the rest replaced. An IANA zone is written as `time timezone <minutes>` and a
|
||
`time daylight-time-rule` from its POSIX rule: the US and EU dates as the switch's own
|
||
rules, other Sunday rules as `user-defined` dates; 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 with `write memory`; what the switch already has
|
||
is not sent again. Over REST the writes run on a temporary SSH session, as
|
||
`configure_snmp_agent` does.
|
||
|
||
### Changed
|
||
- Needs napalm-device-types 4.35.0.
|
||
- `get_ntp_servers()` lists the configured servers as `get_time_sync()` reads them, over
|
||
every transport. Over SSH it took every IPv4 address in `show ntp associations` (or
|
||
`show timesync`), over REST the `ntp/server` resource. `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 to `True` had 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 `six` that 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, `set_interface()` a description, with a line break or a
|
||
double quote (`ValueError`), over every transport, before anything is sent (#28,
|
||
NetOrk/netork#2455). Over SSH each went into `name "<value>"` in config mode: a line
|
||
break ended that line and the switch ran the rest as commands, then `write 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 and `optional_args["tls_certificate_observer"]` receives every one seen. A
|
||
different certificate is refused before the password is sent and ends `open()` with
|
||
`TlsCertificateMismatch` (a `ConnectionException` naming 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_agent` over the REST API opens its temporary SSH session on port 22.
|
||
It used `optional_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_config` reads the switch's communities over the REST API too. It returned
|
||
`None` there, 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_servers` and `get_poe_status` answer with no
|
||
hostname, ports, VLANs or neighbours. They now raise `ConnectionException` when the
|
||
switch does not answer or refuses the session (HTTP 401/403) and `RuntimeError` for
|
||
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_config` raises when neither the REST API nor the SSH fallback could read the
|
||
configuration. It returned an empty running configuration.
|
||
- `get_config` on a switch whose REST API has no configuration (2530 / YA series) reads
|
||
over SSH what `retrieve` asks 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.typed`
|
||
and 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 to
|
||
`optional_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 in `show snmp-server`.
|
||
|
||
### Removed
|
||
- **Breaking:** `fix_snmp` and `run_device_action`; `fix_snmp` set the community
|
||
`public`.
|
||
|
||
## [0.3.0] - 2026-10-16
|
||
|
||
### Changed
|
||
- The driver no longer collects over SNMP: `SNMP_HEALTH_PROFILE` declares 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.
|