python-zabbix-utils
python-zabbix-utils copied to clipboard
RFE: could enums be added to the library to cover the flag values some API points take?
For example, the interfaces field is a good example (on the host.create() API):
interface = [ { "type": 1, # 1 is 'agent', 2 is 'SNMP', 3 is 'IPMI', 4 is 'JMX' "main": 1, # 0 is 'not default', 1 is 'default' "useip": 0, # 0 is 'use DNS', 1 is 'use IP' "ip": "", # doc says can be blank but not _undefined_ if using DNS "dns": f"{host['name']}.{hg_config['dns_domain']}", "port": "10050", # default port for zabbix agent # BUG: this is wrong for other template types } ]
Would be more clear if
"type": interface.agent,
"main": interface.default,
etc etc
were allowed.
Hello @matthewsht, thanks for your comment. Sorry, I'm not sure I got your example. Could you clarify what is the principal issue in your case? Maybe you can provide more examples or a longer description of the problem. In general, the ZabbixAPI class is just a wrapper for Zabbix API. So, it provides literally the same methods and fields as the API.
Issue closed due to long time no feedback from the author.