示例#1
0
 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
示例#2
0
 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
示例#3
0
    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
示例#4
0
    def index_delete(self, **kwargs):
        log.info("Received request to Delete dashboard")

        handler = api_handler.ApiHandler()
        resp = handler.delete_dashboard(**kwargs)
        return resp
示例#5
0
    def index_put(self, **kwargs):
        log.info("Received request to create dashboard")

        handler = api_handler.ApiHandler()
        resp = handler.create(**kwargs)
        return resp
示例#6
0
    def post(self, **kwargs):
        log.info("Received request to update a dashboard")

        handler = api_handler.ApiHandler()
        resp = handler.update_dashboard(**kwargs)
        return resp
示例#7
0
 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