mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-16 04:02:56 -06:00
fixed linting
This commit is contained in:
parent
9933c97e94
commit
c2b25e0cd2
@ -229,7 +229,7 @@ class PhysicalDevice:
|
|||||||
self.inventory = field_mapper(
|
self.inventory = field_mapper(
|
||||||
self.name, self._inventory_map(), nbdevice, self.logger
|
self.name, self._inventory_map(), nbdevice, self.logger
|
||||||
)
|
)
|
||||||
self.logger.debug(f"Host {self.name}: Resolved inventory: {self.inventory}")
|
self.logger.debug(f"Host {self.name}: Resolved inventory: {self.inventory}")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def isCluster(self):
|
def isCluster(self):
|
||||||
|
@ -168,7 +168,7 @@ def sanatize_log_output(data):
|
|||||||
if "macros" in data:
|
if "macros" in data:
|
||||||
for macro in sanitized_data["macros"]:
|
for macro in sanitized_data["macros"]:
|
||||||
# Check if macro is secret type
|
# Check if macro is secret type
|
||||||
if not (macro["type"] == str(1) or
|
if not (macro["type"] == str(1) or
|
||||||
macro["type"] == 1):
|
macro["type"] == 1):
|
||||||
continue
|
continue
|
||||||
macro["value"] = "********"
|
macro["value"] = "********"
|
||||||
|
@ -121,5 +121,5 @@ class ZabbixUsermacros:
|
|||||||
if m:
|
if m:
|
||||||
macros.append(m)
|
macros.append(m)
|
||||||
data={'macros': macros}
|
data={'macros': macros}
|
||||||
self.logger.debug(f"Host {self.name}: Resolved macros: {sanatize_log_output(data)}")
|
self.logger.debug(f"Host {self.name}: Resolved macros: {sanatize_log_output(data)}")
|
||||||
return macros
|
return macros
|
||||||
|
Loading…
Reference in New Issue
Block a user