Test template v3 causing_alarm.
Change-Id: Ic61f9729fc2549f1435825d8ecc34ac3d8da0750 Story: 2004871 Task: 29129
This commit is contained in:
parent
a74ce21daa
commit
39cb545f05
@ -41,6 +41,7 @@ TRIGGER_ALARM_2_V3 = 'e2e.test_basic_actions.trigger.alarm2.v3'
|
||||
TRIGGER_ALARM_3_V3 = 'e2e.test_basic_actions.trigger.alarm3.v3'
|
||||
TRIGGER_ALARM_4_V3 = 'e2e.test_basic_actions.trigger.alarm4.v3'
|
||||
TRIGGER_ALARM_5_V3 = 'e2e.test_basic_actions.trigger.alarm5.v3'
|
||||
TRIGGER_ALARM_6_V3 = 'e2e.test_basic_actions.trigger.alarm6.v3'
|
||||
DEDUCED_V3 = 'e2e.test_basic_actions.deduced.alarm.v3'
|
||||
|
||||
TRIGGER_ALARM_2_PROPS = {
|
||||
@ -55,6 +56,12 @@ TRIGGER_ALARM_2_PROPS_V3 = {
|
||||
VProps.VITRAGE_TYPE: DOCTOR_DATASOURCE,
|
||||
}
|
||||
|
||||
TRIGGER_ALARM_6_PROPS_V3 = {
|
||||
VProps.NAME: TRIGGER_ALARM_6_V3,
|
||||
VProps.VITRAGE_CATEGORY: EntityCategory.ALARM,
|
||||
VProps.VITRAGE_TYPE: DOCTOR_DATASOURCE,
|
||||
}
|
||||
|
||||
DEDUCED_PROPS = {
|
||||
VProps.NAME: DEDUCED,
|
||||
VProps.VITRAGE_CATEGORY: EntityCategory.ALARM,
|
||||
@ -249,6 +256,12 @@ class TestBasicActions(TestActionsBase):
|
||||
DEDUCED_PROPS_V3,
|
||||
TRIGGER_ALARM_2_PROPS_V3)
|
||||
|
||||
@utils.tempest_logger
|
||||
def test_action_add_raise_alarm_with_causing_alarm(self):
|
||||
self._do_test_action_add_causal_relationship(TRIGGER_ALARM_6_V3,
|
||||
DEDUCED_PROPS_V3,
|
||||
TRIGGER_ALARM_6_PROPS_V3)
|
||||
|
||||
def _do_test_action_add_causal_relationship(self,
|
||||
trigger_name,
|
||||
deduced_props,
|
||||
|
@ -14,6 +14,8 @@ entities:
|
||||
name: e2e.test_basic_actions.trigger.alarm4.v3
|
||||
trigger_alarm_5:
|
||||
name: e2e.test_basic_actions.trigger.alarm5.v3
|
||||
trigger_alarm_6:
|
||||
name: e2e.test_basic_actions.trigger.alarm6.v3
|
||||
deduced_alarm:
|
||||
name: e2e.test_basic_actions.deduced.alarm.v3
|
||||
type: vitrage
|
||||
@ -37,7 +39,6 @@ scenarios:
|
||||
target: host
|
||||
alarm_name: e2e.test_basic_actions.deduced.alarm.v3
|
||||
severity: WARNING
|
||||
# causing_alarm: trigger_alarm_2
|
||||
- condition: trigger_alarm_2 [ on ] host AND deduced_alarm [on] host
|
||||
actions:
|
||||
- add_causal_relationship:
|
||||
@ -52,3 +53,10 @@ scenarios:
|
||||
actions:
|
||||
- mark_down:
|
||||
target: instance
|
||||
- condition: trigger_alarm_6 [ on ] host
|
||||
actions:
|
||||
- raise_alarm:
|
||||
target: host
|
||||
alarm_name: e2e.test_basic_actions.deduced.alarm.v3
|
||||
severity: WARNING
|
||||
causing_alarm: trigger_alarm_6
|
||||
|
Loading…
Reference in New Issue
Block a user