Commit Graph
11 Commits
Author SHA1 Message Date
Christian Manivong 51bcfc5724 fix(deps): a floor on netaddr the lowest versions can import
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 43s
driver / test (3.10) (pull_request) Successful in 58s
driver / test (3.11) (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 59s
driver / test (3.13) (pull_request) Successful in 48s
driver / lowest (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m1s
driver / build (pull_request) Successful in 32s
CI / driver (pull_request) Successful in 6m55s
driver / publish (pull_request) Skipped
Unfloored, the CI lowest job installs netaddr 0.3.1, which has no
IPAddress, and every test module fails to import. 0.7.19 has it; 194 tests
pass at the lowest declared versions.
2026-10-23 09:05:22 +02:00
Christian Manivong 6d884898c7 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m0s
driver / test (3.10) (pull_request) Successful in 1m9s
driver / test (3.11) (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 46s
driver / test (3.13) (pull_request) Successful in 55s
driver / lowest (pull_request) Failing after 25s
driver / security (pull_request) Successful in 1m0s
driver / build (pull_request) Successful in 26s
CI / driver (pull_request) Failing after 7m18s
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.
- requires-python >=3.10 (napalm-device-types needs it), napalm-device-types
  >=4.21.1, LICENSE file, py.typed, SPDX license string, a dev extra with
  floors, links to git.netork.io (README included), CHANGELOG.md.
- mypy strict for the package; exempt for now, with 130 errors between
  them: napalm_openwrt.config_mixin, .interfaces_mixin, .lldp_mixin,
  .openwrt, .packages_mixin, .routing_mixin, .system_mixin, .vlan_mixin and
  .wireless_mixin. They are recorded in the quality baseline with the long
  and complex functions and the one unannotated public method.
- Coverage floor 65 % (measured 65.03 %).
2026-10-23 08:35:03 +02:00
Christian Manivong a212bc8715 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:32:47 +02:00
Christian Manivong cb14f1f00f fix(ssh): verify the host key netOrk expects, report the one seen (NetOrk/netork#1167)
CI / test (3.10) (push) Successful in 34s
CI / test (3.11) (push) Successful in 40s
CI / test (3.12) (push) Successful in 34s
CI / test (3.10) (pull_request) Successful in 36s
CI / test (3.11) (pull_request) Successful in 29s
CI / test (3.12) (pull_request) Successful in 27s
The driver accepted any SSH host key. It now verifies through
napalm-device-types' HostKeyCheck (>= 4.19.0): 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 it connects as before (first use).
2026-10-18 21:23:40 +02:00
Christian Manivong d89bb38688 feat: reboot_host (0.5.0)
CI / test (3.10) (push) Successful in 26s
CI / test (3.11) (push) Successful in 23s
CI / test (3.12) (push) Successful in 26s
CI / test (3.10) (pull_request) Successful in 25s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 25s
HostRebootMixin's reboot_host over the command channel: reboot detached
and two seconds late, so the answer comes back before the session goes
down, and a refusal is raised instead of being mistaken for the dropped
session. netOrk sent /sbin/reboot through the private _send_command and
could not tell the two apart (netOrk #1113). A login other than root is
refused before anything runs.
2026-10-18 14:45:44 +02:00
Christian Manivong 595496549b feat: a public command channel; no warnings of its own (0.4.0)
CI / test (3.10) (push) Successful in 25s
CI / test (3.11) (push) Successful in 24s
CI / test (3.12) (push) Successful in 25s
CI / test (3.10) (pull_request) Successful in 25s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 25s
run_command and open_stream (napalm-device-types CommandChannelMixin,
which AccessPointDriver carries) run on an SSH exec channel next to
netmiko's shell: stdin, stderr apart, a real exit code. netOrk sent UCI
scripts and the wifi channel through the private _send_command, typing
a file in base64 chunks or printf lines; with stdin it writes it with
cat, and base64 is needed for nothing (netOrk #1113). OpenWrt has no
sudo, so a privileged command from a login other than root is refused
before it runs.

get_device_warnings goes with it: no_base64 was its last code.
2026-10-18 14:08:09 +02:00
Christian Manivong 34d80bd994 feat: name only a missing base64; lldpd, auc and updates are facts (0.3.0)
CI / test (3.10) (push) Successful in 26s
CI / test (3.11) (push) Successful in 23s
CI / test (3.12) (push) Successful in 26s
CI / test (3.10) (pull_request) Successful in 24s
CI / test (3.11) (pull_request) Successful in 22s
CI / test (3.12) (pull_request) Successful in 25s
get_device_warnings no longer names lldpd_not_installed,
updates_available or update_notifications_disabled. The packages and
get_available_updates are the facts; netOrk derives the warnings with the
same reach (netOrk #1111). The old update read swallowed failures,
get_available_updates raises them.

no_base64 stays: BusyBox may provide base64 as an applet, so no package
tells the caller whether it is there.
2026-10-17 09:37:43 +02:00
Christian Manivong 968d6583ba feat!: fix templates with the caller's values replace run_device_action (0.2.0)
CI / test (3.10) (push) Successful in 26s
CI / test (3.11) (push) Successful in 24s
CI / test (3.12) (push) Successful in 26s
CI / test (3.10) (pull_request) Successful in 25s
CI / test (3.11) (pull_request) Successful in 23s
CI / test (3.12) (pull_request) Successful in 25s
fix_snmp set no community at all and opened the management zone's
udp/161 to every source, with a rule named after an application; a
second fix_snmp in the system mixin was shadowed and never ran (#5).
install_lldpd, install_auc and install_coreutils_base64 were actions of
their own.

The driver implements napalm-device-types 4.13's templates instead:
- configure_snmp_agent(settings): snmpd installed when missing;
  community, contact and location in UCI with one com2sec (com2sec6)
  per allowed source; the zone-resolving firewall step of the old fix,
  now limited to the sources (src_ip) and named Allow-SNMP; snmpd
  enabled, restarted and listening;
- get_management_peer() from SSH_CONNECTION;
- ensure_package(name) from the base package, over install_package.
A community, contact or location that would break UCI is refused.

BREAKING CHANGE: run_device_action is removed. Requires
napalm-device-types 4.13.

Closes #5. Part of #13.
2026-10-17 08:33:25 +02:00
Christian Manivong 96f94770cd feat: report what listens, and which procd service it is
Mixes in napalm-device-types' ListeningSocketsMixin (2.5.0): without ss
the shared command reads busybox netstat, and each process's cgroup names
its procd service. The driver only carries the command across.

Over an SSH exec channel of its own, not the interactive shell: busybox
ash cuts a typed line at 512 characters, the command is longer, and the
cut line left the shell waiting for a closing quote. OpenWrt logs in as
root; a login other than root cannot become root, so its reading says it
is not attributed.

Checked against a real OpenWrt 25.12.2 access point. For netOrk#673.
2026-10-07 07:20:27 +02:00
Christian Manivong bfc19c2241 fix(deps): pin paramiko>=5.0.0 (CVE-2026-44405) 2026-07-02 12:22:55 +02:00
Christian Manivong 1f0349aee9 initial commit 2026-05-29 09:10:40 +02:00