Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matthewsht opened this issue Mar 6, 2024 · 1 comment

Comments

@matthewsht
Copy link

matthewsht commented Mar 6, 2024

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.

@aiantsen
Copy link
Contributor

aiantsen commented Apr 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants