Skip to content

Commit

Permalink
Merge branch 'main' into auto-bump-grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemental authored Aug 9, 2024
2 parents b7acd65 + 825100f commit dcc2ea2
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
__pycache__/
changelogs/.plugin-cache.yaml
20 changes: 20 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
======

Expand Down
18 changes: 18 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions changelogs/fragments/392-dashboard-lookup-apikey.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Fixed check if grafana_api_key is defined for `grafana_dashboard` lookup
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: community
name: grafana
version: 2.0.0
version: 2.1.0
readme: README.md
authors:
- Rémi REY (@rrey)
Expand Down
4 changes: 2 additions & 2 deletions plugins/lookup/grafana_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit dcc2ea2

Please sign in to comment.