Skip to content

Commit

Permalink
Fix for missing mgmt-ip in LLDP output (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
illes authored Jun 20, 2022
1 parent 6181800 commit be770a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox_agent/lldp.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_switch_ip(self, interface):
# lldp.eth0.chassis.mgmt-ip=100.66.7.222
if self.data['lldp'].get(interface) is None:
return None
return self.data['lldp'][interface]['chassis']['mgmt-ip']
return self.data['lldp'][interface]['chassis'].get('mgmt-ip')

def get_switch_port(self, interface):
# lldp.eth0.port.descr=GigabitEthernet1/0/1
Expand Down

0 comments on commit be770a9

Please sign in to comment.