Fixed Pylint too-many-public-methods error

This commit is contained in:
TheNetworkGuy 2024-11-15 14:08:04 +01:00
parent 5d4ff9c5ed
commit 0155c29fcc

View File

@ -305,7 +305,7 @@ class PhysicalDevice():
# Delete host should it exists # Delete host should it exists
self.zabbix.host.delete(self.zabbix_id) self.zabbix.host.delete(self.zabbix_id)
e = f"Host {self.name}: Deleted host from Zabbix." e = f"Host {self.name}: Deleted host from Zabbix."
self.zeroize_cf() self._zeroize_cf()
self.logger.info(e) self.logger.info(e)
self.create_journal_entry("warning", "Deleted host from Zabbix") self.create_journal_entry("warning", "Deleted host from Zabbix")
except APIRequestError as e: except APIRequestError as e:
@ -313,7 +313,7 @@ class PhysicalDevice():
self.logger.error(message) self.logger.error(message)
raise SyncExternalError(message) from e raise SyncExternalError(message) from e
def zeroize_cf(self): def _zeroize_cf(self):
"""Sets the hostID custom field in Netbox to zero, """Sets the hostID custom field in Netbox to zero,
effectively destroying the link""" effectively destroying the link"""
self.nb.custom_fields[device_cf] = None self.nb.custom_fields[device_cf] = None