Adds tags for inhibit and silence

The new silence and inhibit rules will include tags on the alarm
that can be queried via the api. For more information and
documentation see: https://review.openstack.org/#/c/466403

Change-Id: I85b8bfc9338ee17709ec30aeb4b807b3bc12404e
This commit is contained in:
Andrea Adams 2017-06-05 15:34:28 -06:00 committed by Tomasz Trębski
parent 2da2058b83
commit 526790e2f4
1 changed files with 12 additions and 11 deletions

View File

@ -1053,17 +1053,18 @@ class TestAlarms(base.BaseMonascaTest):
break
def _verify_alarm_keys(self, response_body):
self.assertTrue(set(['id',
'links',
'alarm_definition',
'metrics',
'state',
'lifecycle_state',
'link',
'state_updated_timestamp',
'updated_timestamp',
'created_timestamp']) ==
set(response_body))
expected_keys = ['id',
'links',
'alarm_definition',
'metrics',
'state',
'lifecycle_state',
'link',
'state_updated_timestamp',
'updated_timestamp',
'created_timestamp']
for key in expected_keys:
self.assertIn(key, response_body)
def _verify_metric_in_alarm(self, metric, expected_metric):
self.assertEqual(metric['dimensions'], expected_metric['dimensions'])