feat!: fix templates with the caller's values replace run_device_action (0.3.0)
CI / test (3.10) (push) Successful in 33s
CI / test (3.11) (push) Successful in 32s
CI / test (3.12) (push) Successful in 35s
CI / test (3.10) (pull_request) Successful in 32s
CI / test (3.11) (pull_request) Successful in 30s
CI / test (3.12) (pull_request) Successful in 35s
CI / test (3.10) (push) Successful in 33s
CI / test (3.11) (push) Successful in 32s
CI / test (3.12) (push) Successful in 35s
CI / test (3.10) (pull_request) Successful in 32s
CI / test (3.11) (pull_request) Successful in 30s
CI / test (3.12) (pull_request) Successful in 35s
fix_snmp overwrote snmpd.conf with an application's values (community "public", "Managed by netOrk", netork@localhost) through a fixed /tmp/netork_snmpd.conf, and opened ufw for a /24 guessed from ss; install_lldpd was an action of its own. Neither read an exit status. The driver implements napalm-device-types 4.13's templates instead: - configure_snmp_agent(settings): net-snmp installed, snmpd.conf with one rocommunity line per allowed source (mktemp, install as root), ufw opened for those sources only (pve-firewall stays the operator's), snmpd enabled and restarted; - get_management_peer() from SSH_CONNECTION; - install_package(name), as the contract says (raises when apt fails), so ensure_package comes from the base package. Every step reads its exit status. BREAKING CHANGE: run_device_action is removed. Requires napalm-device-types 4.13. Part of #24.
This commit is contained in:
1 parent
98df0e21ca
commit
890e84ca6b
4 files changed
+208
-119
No files matched your search
@@ -35,12 +35,14 @@ from typing import Any
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from napalm_device_types import (
|
||||
EnsurePackageMixin,
|
||||
FingerprintRule,
|
||||
HostStatusMixin,
|
||||
HypervisorDriver,
|
||||
KernelFactsMixin,
|
||||
ListeningSocketsMixin,
|
||||
PortSpec,
|
||||
SnmpAgentMixin,
|
||||
SystemIdentityMixin,
|
||||
SystemdServicesMixin,
|
||||
)
|
||||
@@ -90,6 +92,8 @@ class ProxmoxDriver(
|
||||
SystemIdentityMixin,
|
||||
SystemdServicesMixin,
|
||||
HostStatusMixin,
|
||||
SnmpAgentMixin,
|
||||
EnsurePackageMixin,
|
||||
HypervisorDriver,
|
||||
):
|
||||
"""NAPALM driver for Proxmox VE nodes."""
|
||||
|
||||
Reference in new issue
Block a user