mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-14 01:41:25 -06:00
Fixed Pylint too-many-public-methods error
This commit is contained in:
parent
5d4ff9c5ed
commit
0155c29fcc
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user