Files
napalm-sonos/CHANGELOG.md
T
Christian Manivong 3994a4bfc9
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 17s
driver / types (pull_request) Successful in 1m6s
driver / test (3.12) (pull_request) Successful in 4m16s
driver / test (3.13) (pull_request) Successful in 4m3s
driver / lowest (pull_request) Successful in 3m34s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 5m38s
driver / publish (pull_request) Skipped
fix(driver): load_replace_candidate is None, not a stub that raises (NetOrk/netork#2503)
The driver cannot replace a device's configuration, and said so with a
load_replace_candidate that raised NotImplementedError. A method that only
raises still looks like a replace to anyone who asks whether the driver has
one: netOrk offered a config restore for these devices that could only fail.

None is how a driver switches off a method, the convention netOrk's
capability checks and napalm-device-types follow, so asking now says no.
Nothing in the driver calls it.
2026-11-13 21:45:24 +01:00

4.9 KiB
Raw Blame History

Changelog

All notable changes to this driver. The format follows Keep a Changelog, versions follow Semantic Versioning.

[Unreleased]

Changed

  • load_replace_candidate is None instead of a method that raises NotImplementedError, so a caller that asks whether the driver can replace a configuration gets no. netOrk offered a config restore for these devices that could only fail (NetOrk/netork#2503).
  • Breaking: get_playback_state() and get_zone_info() return the shapes of napalm-device-types' media contract. get_playback_state() is {"state": "playing"|"paused"|"stopped"|"transitioning", "source": "radio"|…} instead of SoCo's transport string ("PAUSED_PLAYBACK"); a speaker with nothing queued is stopped, and a state outside the four raises CommandErrorException. get_zone_info() is a list with one {"name", "coordinator", "members"} entry for the speaker's group instead of the speaker's details, which stay in get_facts() (#11).
  • 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.
  • Breaking: the NAPALM getters a speaker has nothing for are no longer overridden: get_config(), get_environment(), get_optics(), the routing, ARP, MAC table, LLDP, NTP, SNMP, BGP, probe, user, network-instance and firewall-policy getters raise NAPALM's NotImplementedError instead of answering {} or []. An empty answer read as "implemented, nothing there", and get_config() and get_route_to() did not even take NAPALM's arguments: get_config(retrieve="running") raised TypeError, which a caller reported as a failed configuration backup on every poll (#13).
  • Breaking: get_interfaces_ip() and cli() are left to NAPALM's stubs and raise NotImplementedError. get_interfaces_ip() reported the speaker's address with a prefix length of 24 it never read -- the speaker reports none, and SoCo has no reading for one -- so a speaker in any other network size was reported wrongly. cli() answered [], not even NAPALM's dict shape, for a speaker that has no CLI (#15).

Fixed

  • play(), pause(), stop(), next_track(), previous_track(), set_volume() and set_mute() raise ConnectionClosedException when the driver is not connected, instead of returning as if the speaker had done it (#2).
  • get_arp_table() takes NAPALM's vrf argument (#2).
  • The driver module carries its docstring again (__doc__ was None) (#2).
  • get_facts(), get_interfaces() and get_interfaces_ip() no longer guess whether the speaker is wired: SoCo offers no reading for it, and the check looked for an attribute SoCo does not have, so it never found eth0 anyway. The speaker reports one interface, wlan0, described as "Network (wired or wireless unknown)" (#2).
  • get_group_info() and get_zone_info() raise instead of answering {} when the driver is not connected (ConnectionClosedException) or the read fails (ConnectionException, CommandErrorException); {} / [] now only means the speaker is in no group (#11).
  • get_playback_state() reports the speaker's real transport state (PLAYING, PAUSED_PLAYBACK, STOPPED, TRANSITIONING); it called a method SoCo does not have and answered STOPPED for every speaker (#9).
  • get_volume(), get_mute(), get_playback_state() and get_current_track() raise instead of answering 0, False, STOPPED or {}: ConnectionClosedException when the driver is not connected, ConnectionException when the speaker cannot be reached, CommandErrorException when it refuses the request. An unreachable speaker no longer reads as a silent, stopped one (#9).

[0.3.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, a README and a LICENSE file. Python 3.9 is no longer supported; napalm-device-types never ran on it.
  • napalm-device-types (4.21.1 or later, from PyPI) is now a declared dependency; the driver always imported it.
  • A failure to read the speaker's device properties (wired or wireless) is now logged at debug level.

[0.2.0] - 2026-10-17

Removed

  • Breaking: run_device_action(). The media controls it dispatched by string (play, pause, stop, next/previous track, volume, mute) are the typed methods play(), set_volume() and the others.

[0.1.0] - 2026-06-13

Added

  • sonos driver: facts, interfaces and media controls for Sonos speakers through SoCo.