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

Update zabbix_maintenance.py #665

Merged
merged 1 commit into from
Apr 8, 2022
Merged

Conversation

polcape
Copy link
Contributor

@polcape polcape commented Apr 5, 2022

Change to int casting as discussed here #637

SUMMARY

Failed to create maintenance on Zabix 6 and Python3.9

Fixes #637

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

Zabbix maintenance

ADDITIONAL INFORMATION

Creating Zabbix maintenance this error happens

fatal: [server]: FAILED! => {"changed": false, "msg": "Failed to create maintenance: (u'Error -32602: Invalid params., Invalid parameter \"/1/active_since\": an unsigned integer is expected. while sending {\"params\": {\"maintenance_type\": 0, \"active_since\": \"1645364880.0\", \"active_till\": \"1645365660.0\", \"groupids\": [\"32\"], \"timeperiods\": [{\"timeperiod_type\": \"0\", \"start_date\": \"1645365060.0\", \"period\": \"600\"}], \"description\": \"Created by Ansible\", \"hostids\": [], \"name\": \"Test\"}, \"jsonrpc\": \"2.0\", \"method\": \"maintenance.create\", \"auth\": \"dd0f5d574072ce6bc66d511b\", \"id\": 4}', -32602)"}

Change to int cast as discussed here ansible-collections#637
@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #665 (42a7354) into main (deba504) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #665   +/-   ##
=======================================
  Coverage   70.98%   70.98%           
=======================================
  Files          27       27           
  Lines        3550     3550           
  Branches      920      920           
=======================================
  Hits         2520     2520           
  Misses        751      751           
  Partials      279      279           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8c9a35...42a7354. Read the comment docs.

Copy link
Contributor

@D3DeFi D3DeFi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution! <3

@D3DeFi
Copy link
Contributor

D3DeFi commented Apr 8, 2022

Thank you for this contribution! <3

Will merge once tests pass. I expect sanity for devel branch to fail because this PR doesn't have changes from #666, but that can be ignored safely

@D3DeFi D3DeFi merged commit 2ec2dac into ansible-collections:main Apr 8, 2022
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

Successfully merging this pull request may close these issues.

Can't create maintenance on Zabbix 6
2 participants