make sure to update IPMI interface when mac changed

This commit is contained in:
Solvik Blum 2019-08-12 16:41:55 +02:00
commit bbbf584d20
No known key found for this signature in database
GPG key ID: CC12B3DC262B6C47

View file

@ -221,7 +221,9 @@ class Network():
update = False
self.create_or_update_netbox_ip_on_interface(address, interface)
update, interface = self.reset_vlan_on_interface(nic['vlan'], interface)
if mac != interface.mac_address:
if mac.upper() != interface.mac_address:
logging.info('IPMI mac changed from {old_mac} to {new_mac}'.format(
old_mac=interface.mac_address, new_mac=mac.upper()))
interface.mac_address = mac
update = True
if update: