Commit Graph
16 Commits
Author SHA1 Message Date
Christian Manivong c5d0b0d0f6 chore(release): 0.3.0
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 47s
driver / test (3.10) (pull_request) Successful in 5m50s
driver / test (3.11) (pull_request) Successful in 5m47s
driver / test (3.12) (pull_request) Successful in 5m47s
driver / security (pull_request) Successful in 1m7s
driver / build (pull_request) Successful in 28s
driver / lowest (pull_request) Successful in 5m26s
driver / test (3.13) (pull_request) Successful in 5m50s
CI / driver (pull_request) Successful in 12m9s
driver / publish (pull_request) Skipped
2026-10-23 11:37:04 +02:00
Christian Manivong e352801a1a chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 55s
driver / test (3.10) (pull_request) Successful in 5m52s
driver / test (3.11) (pull_request) Successful in 5m58s
driver / test (3.12) (pull_request) Successful in 5m49s
driver / test (3.13) (pull_request) Successful in 5m32s
driver / lowest (pull_request) Successful in 5m19s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 31m5s
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 from PyPI (the floor was 0.4.0).
- LICENSE, CHANGELOG, py.typed, SPDX license string, setuptools>=77,
  version floors on the dev extra (black is gone), links to git.netork.io;
  the README names Python 3.10 and the Gitea CI.
- mypy strict for the package; napalm_fritzbox.fritzbox is exempt for now
  (6 errors), recorded in the quality baseline with four long getters.
- Coverage floor 81 % (measured 81.36 %).
2026-10-23 09:00:49 +02:00
Christian Manivong a2fc59c8ab fix: what bandit and the remaining lint rules found
- get_wan_status: the catch-all except Exception: continue (B112) now logs
  at debug level before the next WAN service is tried, so a swallowed
  failure leaves a trace. A module logger is new.
- The "any remote host" placeholder of get_nat_translations is a named
  constant with a nosec (B104): an address reported as data, never a
  bind. The output is unchanged.
- ruff found nothing left after the mechanical pass.
2026-10-23 08:52:23 +02:00
Christian Manivong b23967417c 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:47:07 +02:00
Christian Manivong ec3e1e9028 feat: report facts, not warnings (0.2.0)
CI / test (3.10) (push) Successful in 5m27s
CI / test (3.11) (push) Successful in 5m24s
CI / test (3.12) (push) Successful in 5m23s
CI / test (3.10) (pull_request) Successful in 5m26s
CI / test (3.11) (pull_request) Successful in 5m18s
CI / test (3.12) (pull_request) Successful in 5m21s
Drop get_device_warnings. The DSL noise margin and the firmware on offer
are already facts in get_system_config (dsl_downstream_noise_margin,
firmware_update_available, firmware_version); netOrk derives
dsl_snr_low and firmware_update_available from them (netOrk #1111).
2026-10-17 09:32:57 +02:00
Christian Manivong 70c5fd5e40 ci: upload-artifact@v3, the version Gitea supports
CI / test (3.10) (push) Successful in 5m39s
CI / test (3.11) (push) Successful in 5m38s
CI / test (3.12) (push) Successful in 5m39s
CI / test (3.10) (pull_request) Successful in 5m39s
CI / test (3.11) (pull_request) Successful in 5m39s
CI / test (3.12) (pull_request) Successful in 5m39s
With the install fixed, the tests ran and passed on 3.10-3.12, and the job
then failed at the last step: upload-artifact@v4 refuses to run on Gitea
(GHESNotSupportedError).
2026-10-04 01:14:24 +02:00
Christian Manivong e85637496c ci: install napalm-device-types from git, so the tests run at all
CI / test (3.10) (push) Failing after 5m43s
CI / test (3.11) (push) Failing after 5m39s
CI / test (3.12) (push) Failing after 5m41s
CI / test (3.10) (pull_request) Failing after 5m42s
CI / test (3.11) (pull_request) Failing after 5m38s
CI / test (3.12) (pull_request) Failing after 5m40s
Every CI run died at "pip install -e .[dev]": pyproject.toml asks for
napalm_device_types, which lives in git.netork.io/NAPALM rather than on PyPI,
and pip found only an unrelated 0.1.0 there. Not one test had run in CI.

The workflow now installs napalm-device-types from git first. The matrix
drops 3.8/3.9 and requires-python says >=3.10, because napalm-device-types
itself needs 3.10 -- the package never installed on anything older.

Replayed in a fresh venv: napalm-device-types 2.0.0 from git, then the
package with its dev extras, tests green.
2026-10-04 00:43:45 +02:00
Christian Manivong 13e0073659 fix: stop deriving NAT translations from IPv6 pinholes
CI / test (3.10) (push) Failing after 7s
CI / test (3.11) (push) Failing after 7s
CI / test (3.9) (push) Failing after 13s
CI / test (3.12) (push) Failing after 5m28s
Closes netork#116.

`get_port_forwards` reports IPv4 mappings and IPv6 pinholes together, which is
right — both are inbound rules someone configured. `get_nat_translations` then
iterated all of them, and that is not: a pinhole is a firewall hole, and IPv6
does not do NAT at all.

The entries it produced were nonsense in two ways. They paired an IPv6 host with
the IPv4 WAN address, and `inside_local` came out as "2001:db8::10:22", where
the last colon is a port separator and everything before it is an address that
also contains colons.

The two failing tests were pulling in opposite directions.
`TestGetNatTranslations` was right and the implementation had drifted past it
when pinhole support landed. `TestGetPortForwards::test_returns_all_rules` was
the opposite: it still expected one rule from before pinholes existed, which put
it in direct contradiction with TestIPv6Pinholes further down the same file.
2026-08-21 13:17:37 +07:00
Christian Manivong 4723c44d9d refactor(warnings): report raw signal only, align meta key naming
CI / test (3.10) (push) Failing after 8s
CI / test (3.11) (push) Failing after 7s
CI / test (3.12) (push) Failing after 7s
CI / test (3.9) (push) Failing after 7s
get_device_warnings() now returns only {code, meta} — severity, title,
message, and action are resolved centrally by netork's
WARNING_CATALOG (netork/core/device_warnings.py), not by the driver.
Also renames meta.version -> meta.latest_version for
firmware_update_available so it matches the netgear driver's shape and
the shared catalog message template.
2026-07-20 09:54:23 +02:00
Christian ManivongandClaude Sonnet 4.6 3b3469daa9 feat: WAN-Status, DSL-Stats, Portfreigaben, Firmware-Warnings, PPPoE-Interface
CI / test (3.10) (push) Failing after 20s
CI / test (3.11) (push) Failing after 13s
CI / test (3.12) (push) Failing after 7s
CI / test (3.9) (push) Failing after 13s
- get_system_config(): DSL-Leitungsqualität, Firmware-Status, DNS, NTP
- get_device_warnings(): dsl_snr_low + firmware_update_available
- get_port_forwards(): IPv6-Pinholes via WANIPv6Firewall1 (TCP6/UDP6)
- get_wan_status(): robuste Service-Iteration, kein Crash bei "Auto"-Bitraten
- get_interfaces(): pppoe0-Interface, Service-Guards für LAN/WAN, "connected"-Status
- _to_float(): Helper für sichere TR-064 Feldkonvertierung
- get_device_warnings() implementiert (war als Stub vorhanden)
- Tests für alle neuen Methoden, PPPoE-Fixture

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 22:21:06 +02:00
Christian Manivong 8eaf277504 fix: falsche OUI-Prefixes entfernen (gegen IEEE verifiziert) 2026-06-24 17:06:45 +02:00
Christian Manivong 6a7d2a3e19 fix: OUI-Prefix B0:F2:08 für neuere AVM FritzBox-MACs 2026-06-24 15:48:49 +02:00
Christian ManivongandClaude Sonnet 4.6 e121496df5 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 9b65132949 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 99e9431666 fix: tighten _wan_external_ipv6 except to _OPTIONAL_SERVICE_ERRORS 2026-06-13 03:21:06 +02:00
Christian Manivong 0ba884c808 init 2026-06-13 03:18:28 +02:00