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 statuscake_uptime.py #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

niavlysAO
Copy link

ContactGroup should be a string, which allows to set multiple contact group IDs (comma separation for multiple ID)
according to
cf. https://www.statuscake.com/api/Tests/Updating%20Inserting%20and%20Deleting%20Tests.md

hope it will help

ContactGroup should be a string, which allows to set multiple contact group IDs (comma separation for multiple ID)
according to
cf. https://www.statuscake.com/api/Tests/Updating%20Inserting%20and%20Deleting%20Tests.md
@raphapr
Copy link

raphapr commented May 31, 2018

Hi @niavlysAO, unfortunately this type change will break the check mode. Check out

req_data['ContactGroup'] = (req_data['ContactGroups'][0]['ID']
if req_data['ContactGroup'] else None)
. You need to make the necessary changes there in order to implement multiple contact group ids.

I understand that is something that needs improvement, so thank you for your PR and feel free to contribute!

@niavlysAO
Copy link
Author

Added BasicUser / BasicPass management
I had to modify a bit the check line to exclude infos not given back by the API, as BasicPass and BasicUser are not returned. Works well.

I didn't get how to modify check mode to manage multiple contact group though. Any clue on how to do that ?

@raphapr
Copy link

raphapr commented Jan 4, 2020

@niavlysAO In order to get multiple contact groups I think you should modify the convert() function to handle contact groups IDs as a comma-separated string instead a single integer.

I suggest you keep contact_group as int for now (https://github.com/chaordic/ansible-statuscake/pull/17/files#diff-3f284fa10ef6b892e0147945059ffcbbR434) and make another pull request with multiple contact groups feature.

For this PR when you finish rebasing it to branch master I can approve and merge the contribution.

Sorry for late reply.

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.

2 participants