Fix for missing mgmt-ip in LLDP output (#225)

This commit is contained in:
illes 2022-06-20 13:13:31 +02:00 committed by GitHub
parent 6181800cb3
commit be770a947a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ class LLDP():
# 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