configure_snmp_agent(settings): install net-snmp, snmpd.conf with one rocommunity line per allowed source, udp/161 opened in ufw/iptables only for those sources, snmpd enabled and restarted; each step judged by its exit status. Community/sources/text that would break the file are refused.
configure_package_proxy(url) (apt 00proxy, "" removes it), grant_container_engine_access(user), ensure_package(name) (from the base package).
run_device_action, the four _action_* methods and the unused apt_update_upgrade are gone. No application value is built in any more (public, Managed by netOrk, netork@localhost, the /24 guessed from ss).
The sudo hint names no application settings.
Separate commit: the annotations resolve (Dict/List/Optional imported), with a regression test.
Merge order: together with the netOrk side of NetOrk/netork#1109 and the pin bump — netOrk today calls run_device_action("fix_snmp" | "fix_apt_proxy" | "fix_docker_permissions").
Inherited by napalm-openmediavault and napalm-qnap-qts: QNAP must opt out (= None) of configure_snmp_agent, configure_package_proxy, ensure_package (NAPALM/napalm-qnap-qts#7); OMV may need its own configure_snmp_agent (NAPALM/napalm-openmediavault#6).
Step 4 of NetOrk/netork#1105. Needs NAPALM/napalm-device-types#41 (4.12).
- `configure_snmp_agent(settings)`: install net-snmp, `snmpd.conf` with one `rocommunity` line per allowed source, udp/161 opened in ufw/iptables **only for those sources**, snmpd enabled and restarted; each step judged by its exit status. Community/sources/text that would break the file are refused.
- `configure_package_proxy(url)` (apt `00proxy`, `""` removes it), `grant_container_engine_access(user)`, `ensure_package(name)` (from the base package).
- `run_device_action`, the four `_action_*` methods and the unused `apt_update_upgrade` are gone. No application value is built in any more (`public`, `Managed by netOrk`, `netork@localhost`, the /24 guessed from `ss`).
- The sudo hint names no application settings.
- Separate commit: the annotations resolve (`Dict`/`List`/`Optional` imported), with a regression test.
**Merge order:** together with the netOrk side of NetOrk/netork#1109 and the pin bump — netOrk today calls `run_device_action("fix_snmp" | "fix_apt_proxy" | "fix_docker_permissions")`.
**Inherited by** napalm-openmediavault and napalm-qnap-qts: QNAP must opt out (`= None`) of `configure_snmp_agent`, `configure_package_proxy`, `ensure_package` (NAPALM/napalm-qnap-qts#7); OMV may need its own `configure_snmp_agent` (NAPALM/napalm-openmediavault#6).
Closes #27, closes #29
The driver filled run_device_action with an application's remediations
and their values: community "public", "Managed by netOrk", the
caller's address guessed from ss and a /24 ufw rule, the proxy from an
optional_args key.
It implements napalm-device-types' fix templates instead (4.12), and
the caller supplies every value:
- configure_snmp_agent(settings): net-snmp installed, snmpd.conf with
one rocommunity line per allowed source, udp/161 opened in ufw or
iptables for those sources only, snmpd enabled and restarted. Every
step reads its exit status. A community, source or text that would
break the file is refused.
- configure_package_proxy(url): apt's 00proxy, or removed for "".
- grant_container_engine_access(user): usermod -aG docker for the user
named.
- ensure_package(name): from the base package, over get_packages and
install_package.
run_device_action, its four _action_* methods and the unused
apt_update_upgrade are gone. The sudo hint no longer names an
application's settings.
BREAKING CHANGE: run_device_action is removed; callers use the
templates. Requires napalm-device-types 4.12.
Closes#27
Dict, List and Optional were used in 30 annotations without an import;
from __future__ import annotations kept that from failing until
something resolved them (typing.get_type_hints raised NameError).
Closes#29
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.
Step 4 of NetOrk/netork#1105. Needs NAPALM/napalm-device-types#41 (4.12).
configure_snmp_agent(settings): install net-snmp,snmpd.confwith onerocommunityline per allowed source, udp/161 opened in ufw/iptables only for those sources, snmpd enabled and restarted; each step judged by its exit status. Community/sources/text that would break the file are refused.configure_package_proxy(url)(apt00proxy,""removes it),grant_container_engine_access(user),ensure_package(name)(from the base package).run_device_action, the four_action_*methods and the unusedapt_update_upgradeare gone. No application value is built in any more (public,Managed by netOrk,netork@localhost, the /24 guessed fromss).Dict/List/Optionalimported), with a regression test.Merge order: together with the netOrk side of NetOrk/netork#1109 and the pin bump — netOrk today calls
run_device_action("fix_snmp" | "fix_apt_proxy" | "fix_docker_permissions").Inherited by napalm-openmediavault and napalm-qnap-qts: QNAP must opt out (
= None) ofconfigure_snmp_agent,configure_package_proxy,ensure_package(NAPALM/napalm-qnap-qts#7); OMV may need its ownconfigure_snmp_agent(NAPALM/napalm-openmediavault#6).Closes #27, closes #29
8441110975tofc968fab44