Commit Graph
10 Commits
Author SHA1 Message Date
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