LinuxDriver mixes in napalm-device-types' LogSourcesMixin (4.30.0, NAPALM/napalm-device-types feature/log-sources-2049) and carries its command. OpenMediaVault and QNAP inherit it.
Changes
_run_log_sources_command: as root through _run_privileged where it can, else unprivileged through _send, as for listening sockets.
## Summary
`LinuxDriver` mixes in napalm-device-types' `LogSourcesMixin` (4.30.0, NAPALM/napalm-device-types `feature/log-sources-2049`) and carries its command. OpenMediaVault and QNAP inherit it.
## Changes
- `_run_log_sources_command`: as root through `_run_privileged` where it can, else unprivileged through `_send`, as for listening sockets.
- Requires `napalm-device-types>=4.30.0`.
## Related Issue
Refs NetOrk/netork#2049
## Testing
- `TestGetLogSources` in `tests/test_linux.py`: the shared command, `sudo -n`, and the fallback when sudo refuses.
- Full suite green (366 tests).
- Not checked live on QNAP: QTS without GNU `find` raises `LogSourcesUnavailable`, and netOrk then keeps no reading.
Merge after NAPALM/napalm-device-types#94.
The driver mixes in napalm-device-types' LogSourcesMixin (4.30.0) and
carries its command: as root through sudo where it can, else what the
login user may see. OpenMediaVault and QNAP inherit it.
Refs NetOrk/netork#2049
linux.py is over the file size limit and may not grow (quality ratchet).
Listening sockets and log sources share one transport -- through sudo where
the driver can, else as the login user -- so both move to _readings.py as
LinuxProcessReadingsMixin; linux.py shrinks from 2048 to 2039 lines.
Refs NetOrk/netork#2049
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.
Summary
LinuxDrivermixes in napalm-device-types'LogSourcesMixin(4.30.0, NAPALM/napalm-device-typesfeature/log-sources-2049) and carries its command. OpenMediaVault and QNAP inherit it.Changes
_run_log_sources_command: as root through_run_privilegedwhere it can, else unprivileged through_send, as for listening sockets.napalm-device-types>=4.30.0.Related Issue
Refs NetOrk/netork#2049
Testing
TestGetLogSourcesintests/test_linux.py: the shared command,sudo -n, and the fallback when sudo refuses.findraisesLogSourcesUnavailable, and netOrk then keeps no reading.Merge after NAPALM/napalm-device-types#94.