(self, tags, metrics_json, metrics)
Parse the JSON response and set the metrics
Parse the JSON response and set the metrics
Parse the JSON response and set the metrics
def _set_metrics_from_json(self, tags, metrics_json, metrics):
        """
        Parse the JSON response and set the metrics
        """
        if metrics_json is None:
            return

        for status, (metric_name, metric_type) in iteritems(metrics):
            metric_status = metrics_json.get(status)

            if metric_status is not None:
                self._set_metric(metric_name, metric_type, metric_status, tags)
def _set_metrics_from_json ( self , tags , metrics_json , metrics ) : if metrics_json is None : return for status , ( metric_name , metric_type ) in iteritems ( metrics ) : metric_status = metrics_json . get ( status ) if metric_status is not None : self . _set_metric ( metric_name , metric_type , metric_status , tags )