Skip to content

Commit

Permalink
Fix broken api key lookup
Browse files Browse the repository at this point in the history
The intent is to fallback to look up using the sysname if the host isn't
configured using an IP address.
  • Loading branch information
lunkwill42 committed May 2, 2024
1 parent a00e9af commit 303197f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/nav/ipdevpoll/plugins/paloaltoarp.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def can_handle(cls, netbox):
def handle(self):
"""Handle plugin business, return a deferred."""

api_key = self.configured_devices.get(str(self.netbox.ip), self.netbox.sysname)
api_key = self.configured_devices.get(
str(self.netbox.ip), self.configured_devices.get(self.netbox.sysname, "")
)
self._logger.debug("Collecting IP/MAC mappings for Paloalto device")

mappings = yield self._get_paloalto_arp_mappings(self.netbox.ip, api_key)
Expand Down

0 comments on commit 303197f

Please sign in to comment.