def index(self): log.info("Received request to List Metrics") unit_type = request.GET.get('unit_type') sub_type = request.GET.get('sub_type') handler = api_handler.ApiHandler() resp = handler.get_metrics(unit_type, sub_type) return resp
def sample(self): meter_name = request.GET.get('meter_name') search_string = request.GET.get('search_string') search_type = request.GET.get('search_type') type = request.GET.get('type') log.info("Received request to get sample for meter ") #+meter_name) handler = api_handler.ApiHandler() resp = handler.get_sample(meter_name, search_string, search_type, type) return resp
def post(self, **kwargs): log.info("Received request to create a metrics exporter") handler = api_handler.ApiHandler() resp = handler.create_metrics_exporter(**kwargs) return resp
def index_delete(self, **kwargs): log.info("Received request to Delete dashboard") handler = api_handler.ApiHandler() resp = handler.delete_dashboard(**kwargs) return resp
def index_put(self, **kwargs): log.info("Received request to create dashboard") handler = api_handler.ApiHandler() resp = handler.create(**kwargs) return resp
def post(self, **kwargs): log.info("Received request to update a dashboard") handler = api_handler.ApiHandler() resp = handler.update_dashboard(**kwargs) return resp
def sample(self, **kwargs): log.info("Received request to get sample for meter ") #+meter_name) handler = api_handler.ApiHandler() resp = handler.get_sample(**kwargs) #resp = handler.get_sample(meter_name, search_string, search_type, type) return resp