- "resource_uuid": "my_r_id"}
-
- check_metric.return_value = "my_metric_id"
- check_pay.return_value = "my_payload"
-
- self.alarming.configure_alarm(alarm_endpoint, metric_endpoint, auth_token, values, {})
+ "resource_uuid": "my_r_id",
+ "statistic": "AVERAGE",
+ "threshold_value": 60,
+ "operation": "GT"}
+
+ perf_req.return_value = type('obj', (object,), {'text': '{"alarm_id":"1"}'})
+
+ self.alarming.configure_alarm(alarm_endpoint, auth_token, values, {}, True)
+ payload = {"name": "disk_write_ops",
+ "gnocchi_resources_threshold_rule": {"resource_type": "generic", "comparison_operator": "gt",
+ "granularity": "300", "metric": "disk.write.requests",
+ "aggregation_method": "mean", "threshold": 60,
+ "resource_id": "my_r_id"},
+ "alarm_actions": ["http://localhost:8662"], "repeat_actions": True, "state": "ok", "type": "gnocchi_resources_threshold",
+ "severity": "critical"}