13 Commits
Author SHA1 Message Date
christianmanivong a0a43de734 Merge pull request 'chore: adopt the NAPALM driver standard' (#6) from chore/driver-standard into main
CI / driver (push) Blocked by required conditions
driver / standard (push) Waiting to run
driver / lint (push) Waiting to run
driver / types (push) Waiting to run
driver / test (3.10) (push) Waiting to run
driver / test (3.11) (push) Waiting to run
driver / test (3.12) (push) Waiting to run
driver / test (3.13) (push) Waiting to run
driver / lowest (push) Waiting to run
driver / security (push) Waiting to run
driver / build (push) Waiting to run
driver / publish (push) Waiting for needed jobs
v0.3.0
2026-10-23 14:42:36 +00:00
Christian Manivong 89698c5bd6 chore(release): 0.3.0
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 47s
driver / test (3.10) (pull_request) Successful in 2m44s
driver / test (3.11) (pull_request) Successful in 2m46s
driver / test (3.12) (pull_request) Successful in 2m41s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
driver / test (3.13) (pull_request) Successful in 2m35s
driver / lowest (pull_request) Successful in 2m18s
CI / driver (pull_request) Successful in 5m55s
driver / publish (pull_request) Skipped
2026-10-23 16:01:56 +02:00
Christian Manivong 168841ebb8 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 45s
driver / test (3.10) (pull_request) Successful in 2m40s
driver / test (3.11) (pull_request) Successful in 2m40s
driver / test (3.12) (pull_request) Successful in 2m37s
driver / test (3.13) (pull_request) Successful in 2m34s
driver / lowest (pull_request) Successful in 2m16s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 15m6s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; .github/ is gone.
- napalm-device-types >=4.21.1 is now declared: the driver imports
  MediaDriver, PortSpec and FingerprintRule from it, and CI used to
  install it by hand.
- requires-python >=3.10 (napalm-device-types needs it), LICENSE, README,
  CHANGELOG, py.typed, SPDX license string, setuptools>=77, version floors
  on the dev extra, links to git.netork.io; .gitignore as in the template.
- mypy strict for the package; napalm_sonos.sonos_driver is exempt for now
  (5 errors, two of them return types that differ from MediaDriver's),
  recorded in the quality baseline.
- Coverage floor 71 % (measured 71.30 %).
2026-10-23 09:00:07 +02:00
Christian Manivong a6d1d1e597 fix: what bandit and the remaining lint rules found
- open() raises ConnectionException from the SoCo error (B904), so the
  cause stays attached.
- _check_wired_connection: the except Exception: pass (B110) now logs at
  debug level, so a swallowed failure leaves a trace. A module logger is
  new.
- nosec for the empty password default (B107): a Sonos speaker takes no
  login, the argument exists for NAPALM's constructor signature.
- tests: raise AssertionError instead of assert False (B011).
2026-10-23 08:57:52 +02:00
Christian Manivong ad69c0e643 style: ruff format and the lint rules of the driver standard
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.
2026-10-23 08:55:35 +02:00
christianmanivong 6ceac1d526 Merge pull request 'refactor!: drop run_device_action; the media controls are methods (0.2.0)' (#4) from chore/drop-run-device-action into master
CI / test (3.10) (push) Successful in 2m22s
CI / test (3.11) (push) Successful in 30s
CI / test (3.12) (push) Successful in 31s
2026-10-17 06:51:53 +00:00
Christian Manivong 06dbcf4b83 refactor!: drop run_device_action; the media controls are methods (0.2.0)
CI / test (3.10) (push) Successful in 2m20s
CI / test (3.11) (push) Successful in 27s
CI / test (3.12) (push) Successful in 30s
CI / test (3.10) (pull_request) Successful in 2m19s
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 29s
run_device_action dispatched play, pause, stop, next/previous track,
set_volume:N and toggle_mute by string and returned
{success, action, message} instead of the DeviceActionResultDict its
contract names. The typed methods it called (play(), set_volume(), ...)
are the interface; napalm-device-types deprecates run_device_action.

BREAKING CHANGE: run_device_action is removed.

Closes #3
2026-10-17 08:39:31 +02:00
christianmanivong 95ef8fad42 Merge pull request 'ci: run the tests and build the package on every push and pull request' (#1) from ci/workflow into master
CI / test (3.10) (push) Successful in 2m50s
CI / test (3.11) (push) Successful in 29s
CI / test (3.12) (push) Successful in 31s
2026-10-07 06:40:36 +00:00
Christian Manivong 8672447d16 ci: run the tests and build the package on every push and pull request
CI / test (3.10) (push) Successful in 2m50s
CI / test (3.11) (push) Successful in 29s
CI / test (3.12) (push) Successful in 31s
CI / test (3.10) (pull_request) Successful in 2m50s
CI / test (3.11) (pull_request) Successful in 28s
CI / test (3.12) (pull_request) Successful in 30s
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.
2026-10-07 07:52:44 +02:00
Christian Manivong 8dc3b42fd3 fix: inherit MediaDriver instead of AccessPointDriver
A Sonos speaker implements none of the access-point surface — no SSIDs, no radio
configuration, no MAC ACL. It has get_playback_state, get_volume, play and
get_zone_info. It inherited AccessPointDriver because nothing better existed,
and netOrk reads that role to decide what belongs in its wireless page and its
AP profile pickers, so a speaker showed up in both.

napalm-device-types now has MediaDriver, which is what this is. TYPE_LABEL
becomes "Media" rather than "Access Point".

Same root cause as netork#117.
2026-08-21 13:07:37 +07:00
Christian ManivongandClaude Sonnet 4.6 f33ea2a774 feat: OUI_PREFIXES für MAC/ARP-Fingerprinting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 15:41:45 +02:00
Christian ManivongandClaude Sonnet 4.6 f6bd38a9fe feat: Fingerprint-Attribute für Discovery-Scoring
Ergänzt DRIVER_NAME, HTTP_FINGERPRINT, SNMP_FINGERPRINT, SSH_FINGERPRINT,
PORT_SPECS und SNMP_OBJECT_ID_PREFIX gemäß docs/DISCOVERY_FINGERPRINTING.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 14:47:08 +02:00
Christian Manivong 6d8f01fe27 init 2026-06-13 03:18:28 +02:00