From be6c58ecd385c8ab5a149a9ce343d157e5c49ecf Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Mon, 20 Nov 2023 12:03:35 +0100 Subject: [PATCH] Remove unused function snmp_parameter_factory This has been replaced by SNMPParameters.factory() and no callers are left. --- bin/naventity | 2 +- python/nav/ipdevpoll/snmp/common.py | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/bin/naventity b/bin/naventity index 935f8462c1..239b7543b2 100755 --- a/bin/naventity +++ b/bin/naventity @@ -33,7 +33,7 @@ from nav.bootstrap import bootstrap_django bootstrap_django(__file__) from nav.util import is_valid_ip -from nav.ipdevpoll.snmp.common import snmp_parameter_factory, SnmpError, SNMPParameters +from nav.ipdevpoll.snmp.common import SnmpError, SNMPParameters from nav.ipdevpoll.snmp import AgentProxy, snmpprotocol from nav.mibs.entity_mib import EntityMib from nav.models.manage import Netbox diff --git a/python/nav/ipdevpoll/snmp/common.py b/python/nav/ipdevpoll/snmp/common.py index c45cbc8a04..c50e6fdf9b 100644 --- a/python/nav/ipdevpoll/snmp/common.py +++ b/python/nav/ipdevpoll/snmp/common.py @@ -264,16 +264,5 @@ def as_agentproxy_args(self) -> Dict[str, Any]: return kwargs -# pylint: disable=W0212 -def snmp_parameter_factory(host=None): - """Returns specific SNMP parameters for `host`, or default values from - ipdevpoll's config if host specific values aren't available. - - :returns: An SNMPParameters namedtuple. - - """ - return SNMPParameters.factory(netbox=host) - - class SnmpError(Exception): pass