refactor(snmp): the SNMP agent's helpers in a module of their own
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Failing after 1m2s
driver / test (3.12) (pull_request) Failing after 1m16s
driver / lowest (pull_request) Failing after 29s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m4s
CI / driver (pull_request) Failing after 2m20s
driver / publish (pull_request) Skipped

linux.py had grown past its recorded size with the firewalld rule. The
snmpd.conf rendering, the install commands and the firewalld rule now
live in _snmp_agent.py; linux.py shrinks to 2014 lines and the baseline
records that.
This commit is contained in:
Christian Manivong committed 2026-11-12 12:22:35 +01:00
1 parent aab25fb049
commit 3683c85f21
4 files changed
+90 -71

No files matched your search

+2 -2
View File
@@ -128,7 +128,7 @@ class TestSnmpAgentSteps:
def test_the_firewalld_rule_goes_to_the_default_and_every_active_zone(self, tmp_path):
"""An interface in no zone (a WireGuard wg0) is the default zone's; one in a
zone of its own is that zone's. The rule goes in now and stays after a reload."""
from napalm_linux.linux import firewalld_allow_snmp
from napalm_linux._snmp_agent import firewalld_allow_snmp
log = tmp_path / "calls"
fake = tmp_path / "firewall-cmd"
@@ -165,7 +165,7 @@ class TestSnmpAgentSteps:
assert len(adds) == 8
def test_a_rule_firewalld_holds_already_is_not_added_twice(self, tmp_path):
from napalm_linux.linux import firewalld_allow_snmp
from napalm_linux._snmp_agent import firewalld_allow_snmp
log = tmp_path / "calls"
fake = tmp_path / "firewall-cmd"