run_command() / open_stream() open an exec channel on netmiko's existing SSH transport (remote_conn_pre.get_transport()): no second login, no PTY, separate stderr, real exit code.
privileged=True: root runs directly; with a sudo password sudo -S -p '' sh -c '<cmd>' with the password on stdin (never on the command line), stdin data follows it; without one sudo -n, which fails instead of prompting.
ContainerEngineMixin mixed in, so open_container_engine("docker").open_api() streams the Engine API over docker system dial-stdio. OpenMediaVault and QNAP inherit it.
Existing Docker methods (get_docker_info, get_docker_outdated, ...) unchanged; they go in phase 9.
Tests: tests/test_command_channel.py (all three privilege paths, stdin ordering, stream prefix, dial-stdio, closed connection); suite 134 passed against the device-types branch.
Depends on NAPALM/napalm-device-types#18: CI installs napalm-device-types from main, so it goes green only after that merge.
Implements the public channel and container engine access from NAPALM/napalm-device-types#18 (NetOrk/netork#765, phase 1 = netork#769).
- `run_command()` / `open_stream()` open an exec channel on netmiko's existing SSH transport (`remote_conn_pre.get_transport()`): no second login, no PTY, separate stderr, real exit code.
- `privileged=True`: root runs directly; with a sudo password `sudo -S -p '' sh -c '<cmd>'` with the password on stdin (never on the command line), stdin data follows it; without one `sudo -n`, which fails instead of prompting.
- `ContainerEngineMixin` mixed in, so `open_container_engine("docker").open_api()` streams the Engine API over `docker system dial-stdio`. OpenMediaVault and QNAP inherit it.
- Existing Docker methods (`get_docker_info`, `get_docker_outdated`, ...) unchanged; they go in phase 9.
Tests: `tests/test_command_channel.py` (all three privilege paths, stdin ordering, stream prefix, dial-stdio, closed connection); suite 134 passed against the device-types branch.
**Depends on NAPALM/napalm-device-types#18**: CI installs napalm-device-types from main, so it goes green only after that merge.
Priority: P3
Refs NAPALM/napalm-device-types#17
netOrk drove this driver's shell through the private `_send` (an
interactive PTY, stdout and stderr merged, no exit code) and opened its
own paramiko connections for Docker. napalm-device-types 2.6.0 makes the
channel public; this implements it (NetOrk/netork#765):
- `run_command()` and `open_stream()` open an exec channel on the SSH
transport netmiko already holds: no second login, no PTY, a real exit
status.
- `privileged=True` follows the driver's existing rules: as root the
command runs directly; with a sudo password it goes through
`sudo -S -p ''` and the password is written to stdin, never onto the
command line; without one `sudo -n` fails at once instead of hanging.
- `ContainerEngineMixin` is mixed in, so `open_container_engine("docker")`
streams the Engine API over `docker system dial-stdio`.
The existing Docker methods are unchanged. Version 0.2.0, requires
napalm-device-types >= 2.6.0.
Refs NAPALM/napalm-device-types#17
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements the public channel and container engine access from NAPALM/napalm-device-types#18 (NetOrk/netork#765, phase 1 = netork#769).
run_command()/open_stream()open an exec channel on netmiko's existing SSH transport (remote_conn_pre.get_transport()): no second login, no PTY, separate stderr, real exit code.privileged=True: root runs directly; with a sudo passwordsudo -S -p '' sh -c '<cmd>'with the password on stdin (never on the command line), stdin data follows it; without onesudo -n, which fails instead of prompting.ContainerEngineMixinmixed in, soopen_container_engine("docker").open_api()streams the Engine API overdocker system dial-stdio. OpenMediaVault and QNAP inherit it.get_docker_info,get_docker_outdated, ...) unchanged; they go in phase 9.Tests:
tests/test_command_channel.py(all three privilege paths, stdin ordering, stream prefix, dial-stdio, closed connection); suite 134 passed against the device-types branch.Depends on NAPALM/napalm-device-types#18: CI installs napalm-device-types from main, so it goes green only after that merge.
Priority: P3
Refs NAPALM/napalm-device-types#17