-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix HostsDeleteByIds request due to documentation #11
Conversation
Fix request body to delete hosts by IDs. https://www.zabbix.com/documentation/6.0/en/manual/api/reference/host/delete#:~:text=Examples-,Deleting%20multiple%20hosts,-Delete%20two%20hosts Here we don't need hostids key. So it's just converted to list of ids.
Update host requests due to documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor HostIds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Oh, turns out this change broke support for Zabbix versions older than v2.2, e.g.:
I should have expanded the code below before reviewing, there's fallback code to retry without With Zabbix 6.0, the error seems to have changed from |
We should probably favor newer Zabbix versions, and reverse the calls to first try without |
Hello! Due to official documentation, we don't need "hostids" key. Probably it's the root cause of this issue claranet/terraform-provider-zabbix#34
https://www.zabbix.com/documentation/6.0/en/manual/api/reference/host/delete#:~:text=%22params%22%3A,%5D%2C