+
+ def create_grafana_user(self, user):
+ self.grafana.create_grafana_users(user)
+
+ def create_grafana_team_member(self, project_data, userid):
+ user = self.common_db.get_user_by_id(userid)
+ user_name = user["username"]
+ proj_list = []
+ for project in project_data:
+ proj_list.append(project["project"])
+ for proj in project_data:
+ role_obj = self.common_db.get_role_by_name(proj["role"])
+ is_admin = role_obj["permissions"].get("admin")
+ self.grafana.create_grafana_teams_members(proj["project"], user_name, is_admin, proj_list)
+
+ def create_grafana_team(self, team_name):
+ self.grafana.create_grafana_teams(team_name)
+
+ def delete_grafana_user(self, user_name):
+ self.grafana.delete_grafana_users(user_name)
+
+ def delete_grafana_team(self, project_name):
+ self.grafana.delete_grafana_team(project_name)
+
+ def update_grafana_team(self, project_new_name, project_old_name):
+ self.grafana.update_grafana_teams(project_new_name, project_old_name)