Skip to content

Commit

Permalink
Merge pull request #2753 from lunkwill42/clean/remove-unused-snmp-par…
Browse files Browse the repository at this point in the history
…ameter-factory

Remove unused function snmp_parameter_factory
  • Loading branch information
lunkwill42 authored Nov 21, 2023
2 parents 9add534 + be6c58e commit 4219a2a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion bin/naventity
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions python/nav/ipdevpoll/snmp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4219a2a

Please sign in to comment.