Merge pull request #71 from q1x/allow-proxy-null-value

Allow proxy null value
This commit is contained in:
Twan K. 2024-07-24 14:26:21 +02:00 committed by GitHub
commit 0603d8c244
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -384,11 +384,14 @@ class NetworkDevice():
Sets proxy or proxy group if this
value has been defined in config context
input: List of all proxies and proxy gorups in standardized format
input: List of all proxies and proxy groups in standardized format
"""
# check if the key Zabbix is defined in the config context
if not "zabbix" in self.nb.config_context:
return False
if ("proxy" in self.nb.config_context["zabbix"] and
not self.nb.config_context["zabbix"]["proxy"]):
return False
# Proxy group takes priority over a proxy due
# to it being HA and therefore being more reliable
# Includes proxy group fix since Zabbix <= 6 should ignore this