-
Notifications
You must be signed in to change notification settings - Fork 254
Implemented alert_notification management #3
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
Implemented alert_notification management #3
Conversation
Manual acceptance testing :
|
663fef1
to
820cfb6
Compare
API MR has been merged, thanks @apparentlymart ! I rebased, tests are now ok 👌 |
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.
Mostly looks good! Thanks for the contribution, just a few minor nits and changes.
} | ||
} | ||
|
||
func CreateAlertNotification(a *schema.ResourceData, meta interface{}) error { |
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.
Minor Nit: Conventionally we use d
for *schema.ResourceData
inside of the CRUD functions.
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.
fixed!
"strconv" | ||
|
||
"github.com/hashicorp/terraform/helper/schema" | ||
|
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.
Extra space here
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.
fixed!
return ReadAlertNotification(a, meta) | ||
} | ||
|
||
func UpdateAlertNotification(a *schema.ResourceData, meta interface{}) error { |
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.
Same as above
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.
fixed!
return client.UpdateAlertNotification(alertNotification) | ||
} | ||
|
||
func ReadAlertNotification(a *schema.ResourceData, meta interface{}) error { |
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.
Same as above
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.
fixed!
f701a46
to
041a556
Compare
thanks @grubernaut, fixed the few comments! |
041a556
to
d1f008e
Compare
It's no longer possible to get users from the API in Grafana Cloud with 9.3.2 This test was kinda weird in any case, we were using the fixed ID of the `admin` user, which was probably ID #3 simply as an artifact of our Grafana Cloud process when launching instances So I just removed the `user_id` permission from our test. It's not easy to run this test in a docker Grafana instance because it requires a Grafana Enterprise license
It's no longer possible to get users from the API in Grafana Cloud with 9.3.2 This test was kinda weird in any case, we were using the fixed ID of the `admin` user, which was probably ID #3 simply as an artifact of our Grafana Cloud process when launching instances So I just removed the `user_id` permission from our test. It's not easy to run this test in a docker Grafana instance because it requires a Grafana Enterprise license
It's no longer possible to get users from the API in Grafana Cloud with 9.3.2 This test was kinda weird in any case, we were using the fixed ID of the `admin` user, which was probably ID #3 simply as an artifact of our Grafana Cloud process when launching instances So I just removed the `user_id` permission from our test. It's not easy to run this test in a docker Grafana instance because it requires a Grafana Enterprise license
This MR allows the configuration of the alert notifications.
Before merging I need to rebase after doing a
govendor fetch github.com/apparentlymart/go-grafana-api
once this MR onto the Grafana go library will have been merged : nytm/go-grafana-api#1In the meantime feel free to let me know if I forgot something else, mandatory, in order to get this merged.
ie: tests works locally using the updated library