Skip to content

Commit

Permalink
Merge branch 'main' into rel-200
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemental authored May 31, 2024
2 parents e7f04c8 + 5e76ab7 commit 23506cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
removed_features:
- removed check and handling of mangled api key in `grafana_dashboard` lookup
12 changes: 2 additions & 10 deletions plugins/lookup/grafana_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,8 @@ def grafana_switch_organisation(self, headers):

def grafana_headers(self):
headers = {"content-type": "application/json; charset=utf8"}
if self.grafana_api_key:
api_key = self.grafana_api_key
if len(api_key) % 4 == 2:
display.deprecated(
"Passing a mangled version of the API key to the grafana_dashboard lookup is no longer necessary and should not be done.",
"2.0.0",
collection_name="community.grafana",
)
api_key += "=="
headers["Authorization"] = "Bearer %s" % api_key
if self.grafana_api_key.get("grafana_api_key", None):
headers["Authorization"] = "Bearer %s" % self.grafana_api_key
else:
headers["Authorization"] = basic_auth_header(
self.grafana_user, self.grafana_password
Expand Down

0 comments on commit 23506cb

Please sign in to comment.