mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 15:24:48 -06:00
Changed some logging messages and removed import logging statement from troubleshooting
This commit is contained in:
parent
20096a215b
commit
06f97b132a
@ -145,12 +145,12 @@ class PhysicalDevice():
|
||||
def get_templates_context(self):
|
||||
""" Get Zabbix templates from the device context """
|
||||
if "zabbix" not in self.config_context:
|
||||
e = ("Key 'zabbix' not found in config "
|
||||
f"context for template host {self.name}")
|
||||
e = (f"Host {self.name}: Key 'zabbix' not found in config "
|
||||
"context for template")
|
||||
raise TemplateError(e)
|
||||
if "templates" not in self.config_context["zabbix"]:
|
||||
e = ("Key 'templates' not found in config "
|
||||
f"context 'zabbix' for template host {self.name}")
|
||||
e = (f"Host {self.name}: Key 'templates' not found in config "
|
||||
"context 'zabbix' for template host")
|
||||
raise TemplateError(e)
|
||||
return self.config_context["zabbix"]["templates"]
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
"""Module that hosts all functions for virtual machine processing"""
|
||||
|
||||
from os import sys
|
||||
from logging import getLogger
|
||||
from modules.device import PhysicalDevice
|
||||
from modules.hostgroups import Hostgroup
|
||||
from modules.interface import ZabbixInterface
|
||||
|
Loading…
Reference in New Issue
Block a user