def get_cluster_info(self, cluster_name): response = Response() bool_setup, response = self.check_setup(response) if not bool_setup: return response self.cluster_name = cluster_name url = '%s/cluster/%s' % (self.end_point, self.cluster_name) res = authenticated_get_call(url, access_key=self.api_key) if res.status_code != 200: response.message = bcolors.FAIL + "error while getting the information about the cluster" + bcolors.ENDC response.status = self.status.FAILURE return response response.result = res.json() return response
def get_system_cost(self): """ Returns ------- cost of the current system from the cloud service """ response = Response() bool_setup, response = self.check_setup(response) if not bool_setup: return response url = '%s/cost_estimate' % self.end_point res = authenticated_get_call(url, access_key=self.api_key) if res.status_code != 200: response.message = bcolors.FAIL + "error while getting the information about the cluster" + bcolors.ENDC response.status = self.status.FAILURE return response response.result = res.json() return response
def get_system_info(self): """ Returns ------- To return the Kibana and Grafana links and credentials for it """ response = Response() bool_setup, response = self.check_setup(response) if not bool_setup: return response url = '%s/info' % self.end_point res = authenticated_get_call(url, access_key=self.api_key) if res.status_code != 200: response.message = bcolors.FAIL + "error while getting the information about the cluster" + bcolors.ENDC response.status = self.status.FAILURE return response response.result = res.json() return response