

def get_graphite_metrics_datapoints(*args, **kwargs):
    url = format_url(*args, **kwargs)
    response = make_request(url)
    try:
        LOG.debug('URL: {}'.format(url))
        data = json.loads(response.data)
        data = data[0]
        data = format_datapoints(data['datapoints'], kwargs['normalize_series'])
        if (not data):
            data = []
        return data
    except Exception as e:
        LOG.warn('No data received... {}'.format(e))
        return None

dataset/ETHPy150Open globocom/database-as-a-service/dbaas/util/metrics/metrics.py get_graphite_metrics_datapoints/original