mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-16 04:02:56 -06:00
Merge pull request #2 from q1x/main
Allow for NetBox Config Context to have a null value for proxy.
This commit is contained in:
commit
acad07eed4
@ -371,11 +371,14 @@ class NetworkDevice():
|
|||||||
Sets proxy or proxy group if this
|
Sets proxy or proxy group if this
|
||||||
value has been defined in config context
|
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
|
# check if the key Zabbix is defined in the config context
|
||||||
if not "zabbix" in self.nb.config_context:
|
if not "zabbix" in self.nb.config_context:
|
||||||
return False
|
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
|
# Proxy group takes priority over a proxy due
|
||||||
# to it being HA and therefore being more reliable
|
# to it being HA and therefore being more reliable
|
||||||
# Includes proxy group fix since Zabbix <= 6 should ignore this
|
# Includes proxy group fix since Zabbix <= 6 should ignore this
|
||||||
|
Loading…
Reference in New Issue
Block a user