python-zabbix-utils icon indicating copy to clipboard operation
python-zabbix-utils copied to clipboard

RFE: could enums be added to the library to cover the flag values some API points take?

Open matthewsht opened this issue 11 months ago • 1 comments

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.

matthewsht avatar Mar 06 '24 17:03 matthewsht

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.

aiantsen avatar Apr 08 '24 08:04 aiantsen

Issue closed due to long time no feedback from the author.

aiantsen avatar Aug 30 '24 08:08 aiantsen