feat: a public command channel; no warnings of its own (0.4.0) #16

Merged
christianmanivong merged 1 commits from feat/command-channel into master 2026-10-18 12:10:50 +00:00
Owner

run_command and open_stream (napalm-device-types CommandChannelMixin, already carried by AccessPointDriver) on an SSH exec channel next to netmiko's shell — stdin, separate stderr, a real exit code, the same way napalm-linux does it.

netOrk sent the AP-profile UCI script and the wifi channel through the private _send_command and typed the script in base64 chunks or printf lines (NetOrk/netork#1113). With stdin it writes the file with cat, so base64 is needed for nothing, and no_base64 — the last code get_device_warnings named — goes with the method.

OpenWrt has no sudo: a privileged command from a login other than root raises PermissionError before anything runs.

Part of #13

`run_command` and `open_stream` (napalm-device-types `CommandChannelMixin`, already carried by `AccessPointDriver`) on an SSH exec channel next to netmiko's shell — stdin, separate stderr, a real exit code, the same way napalm-linux does it. netOrk sent the AP-profile UCI script and the wifi channel through the private `_send_command` and typed the script in base64 chunks or `printf` lines (NetOrk/netork#1113). With stdin it writes the file with `cat`, so `base64` is needed for nothing, and `no_base64` — the last code `get_device_warnings` named — goes with the method. OpenWrt has no sudo: a privileged command from a login other than root raises `PermissionError` before anything runs. Part of #13
christianmanivong added 1 commit 2026-10-18 12:08:10 +00:00
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
595496549b
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.
christianmanivong merged commit 5169d2438f into master 2026-10-18 12:10:50 +00:00
christianmanivong deleted branch feat/command-channel 2026-10-18 12:10:50 +00:00
Sign in to join this conversation.