diff --git a/.gitignore b/.gitignore index 2483976d..f61fbd54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ __pycache__/ +changelogs/.plugin-cache.yaml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bf836e6e..72b29254 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,26 @@ Grafana Collection Release Notes .. contents:: Topics +v2.1.0 +====== + +Minor Changes +------------- + +- Manage subfolders for `grafana_folder` and specify uid + +Deprecated Features +------------------- + +- Deprecate `grafana_notification_channel`. It will be removed in version 3.0.0 + +Bugfixes +-------- + +- Add missing function argument in `grafana_contact_point` for org handling +- Fix var prefixes in silence-task in role +- Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup + v2.0.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index d9be1049..cc85d41c 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -333,3 +333,21 @@ releases: name: grafana_contact_point namespace: '' release_date: '2024-05-31' + 2.1.0: + changes: + bugfixes: + - Add missing function argument in `grafana_contact_point` for org handling + - Fix var prefixes in silence-task in role + - Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup + deprecated_features: + - Deprecate `grafana_notification_channel`. It will be removed in version 3.0.0 + minor_changes: + - Manage subfolders for `grafana_folder` and specify uid + fragments: + - 378-grafana-version-sorting.yml + - 379-contact-points-org-name-func-args.yml + - 381-sub-folders.yml + - 382-notification-channel-deprecation.yml + - 392-dashboard-lookup-apikey.yml + - patch-1.yaml + release_date: '2024-08-08' diff --git a/changelogs/fragments/382-notification-channel-deprecation.yml b/changelogs/fragments/382-notification-channel-deprecation.yml index 9af1cf01..cd0463e8 100644 --- a/changelogs/fragments/382-notification-channel-deprecation.yml +++ b/changelogs/fragments/382-notification-channel-deprecation.yml @@ -1,5 +1,5 @@ --- deprecated_features: - - Deprecate `grafana_notification_channel` with removal in version 3.0.0 + - Deprecate `grafana_notification_channel`. It will be removed in version 3.0.0 trivial: - Check Grafana version for `grafana_notification_channel` integration tests diff --git a/changelogs/fragments/392-dashboard-lookup-apikey.yml b/changelogs/fragments/392-dashboard-lookup-apikey.yml new file mode 100644 index 00000000..286e9440 --- /dev/null +++ b/changelogs/fragments/392-dashboard-lookup-apikey.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup diff --git a/galaxy.yml b/galaxy.yml index 0577f6c2..8d76b1ed 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: community name: grafana -version: 2.0.0 +version: 2.1.0 readme: README.md authors: - RĂ©mi REY (@rrey) diff --git a/plugins/lookup/grafana_dashboard.py b/plugins/lookup/grafana_dashboard.py index 514d4fd5..39e068f1 100644 --- a/plugins/lookup/grafana_dashboard.py +++ b/plugins/lookup/grafana_dashboard.py @@ -152,7 +152,7 @@ def grafana_switch_organisation(self, headers): def grafana_headers(self): headers = {"content-type": "application/json; charset=utf8"} - if self.grafana_api_key.get("grafana_api_key", None): + if self.grafana_api_key: headers["Authorization"] = "Bearer %s" % self.grafana_api_key else: headers["Authorization"] = basic_auth_header( @@ -222,9 +222,9 @@ def run(self, terms, variables=None, **kwargs): grafana_dict[key] = value grafana = GrafanaAPI( - **grafana_dict, validate_certs=self.get_option("validate_certs"), ca_path=self.get_option("ca_path"), + **grafana_dict, ) ret = grafana.grafana_list_dashboards()