Implemented #81

This commit is contained in:
TheNetworkGuy 2024-11-21 08:38:42 +01:00
parent 81764b589a
commit 4ec8036c88

View File

@ -154,6 +154,9 @@ class PhysicalDevice():
e = (f"Host {self.name}: Key 'templates' not found in config "
"context 'zabbix' for template lookup")
raise TemplateError(e)
# Check if format is list or string.
if isinstance(self.config_context["zabbix"]["templates"], str):
return [self.config_context["zabbix"]["templates"]]
return self.config_context["zabbix"]["templates"]
def set_inventory(self, nbdevice):