'severity': SEVERITIES[severity],
'type': 'gnocchi_resources_threshold',
'gnocchi_resources_threshold_rule': rule,
- 'alarm_actions': [cfg.OS_NOTIFIER_URI], }, sort_keys=True)
+ 'alarm_actions': [cfg.OS_NOTIFIER_URI],
+ 'repeat_actions': True}, sort_keys=True)
return payload
def get_alarm_state(self, endpoint, auth_token, alarm_id):
"granularity": "300", "metric": "disk.write.requests",
"aggregation_method": "mean", "threshold": 60,
"resource_id": "my_r_id"},
- "alarm_actions": ["http://localhost:8662"], "state": "ok", "type": "gnocchi_resources_threshold",
+ "alarm_actions": ["http://localhost:8662"], "repeat_actions": True, "state": "ok", "type": "gnocchi_resources_threshold",
"severity": "critical"}
perf_req.assert_called_with(
"alarm_endpoint/v2/alarms/", auth_token,
"severity": "low",
"state": "ok",
"type": "gnocchi_resources_threshold",
- "alarm_actions": ["http://localhost:8662"]})
+ "alarm_actions": ["http://localhost:8662"],
+ "repeat_actions": True})
@mock.patch.object(Config, "instance")
@mock.patch.object(Common, "perform_request")
"severity": "low",
"state": "alarm",
"type": "gnocchi_resources_threshold",
- "alarm_actions": ["http://localhost:8662"]})
+ "alarm_actions": ["http://localhost:8662"],
+ "repeat_actions": True})
def test_check_invalid_payload(self):
"""Test the check payload function for an invalid payload."""