Files
vitrage-tempest-plugin/vitrage_tempest_plugin/tests/resources/templates/api/mock_datasource_3rd_degree_scenarios.yaml
T
Idan Hefetz 0b0980f5f2 Add a new tempest job with a mock datasource
In this tempest job, the mock datasource is used to create an entity
graph with ~20,000 vertices. This job will contain tests for
init procedure, processes, restarts, multiple api calls.

Other data sources are disabled. Heat, Telemetry, Mistral
are not installed.

This commit includes the first two tests, both using a template where
each action causes another action (three levels).
one test restarts vitrage-graph so the init procedure evaluates this template.
the other test does not restart. result should be the same.

Change-Id: I9c4c329983bbe5930de5484fa6932b318746ed5c
2018-06-07 08:59:29 +00:00

89 lines
2.6 KiB
YAML

metadata:
name: mock_datasource_3rd_degree_scenarios.yaml
description: Raise a deduced alarm per instance on host, then per each deduced raise another deduced, then add causal relationship between the two
version: 2
type: standard
definitions:
entities:
- entity:
category: ALARM
type: vitrage
name: mock_datasource.3rd_degree_scenarios.deduced.alarm1
template_id: deduced_alarm
- entity:
category: ALARM
type: vitrage
name: mock_datasource.3rd_degree_scenarios.deduced.alarm2
template_id: second_iteration_deduced_alarm
- entity:
category: ALARM
type: zabbix
template_id: zabbix_alarm
- entity:
category: RESOURCE
type: nova.host
name: nova.host-0-nova.zone-0-openstack.cluster-0
template_id: host
- entity:
category: RESOURCE
type: nova.instance
template_id: instance
relationships:
- relationship:
source: deduced_alarm
relationship_type: on
target: instance
template_id : deduced_alarm_on_instance
- relationship:
source: second_iteration_deduced_alarm
relationship_type: on
target: instance
template_id : second_iteration_deduced_alarm_on_instance
- relationship:
source: host
target: instance
relationship_type: contains
template_id: host_contains_instance
- relationship:
source: zabbix_alarm
relationship_type: on
target: host
template_id : zabbix_alarm_on_host
scenarios:
- scenario:
condition: host_contains_instance
actions:
- action:
action_type: raise_alarm
action_target:
target: instance
properties:
alarm_name: mock_datasource.3rd_degree_scenarios.deduced.alarm1
severity: SEVERE
- scenario:
condition: host_contains_instance and deduced_alarm_on_instance
actions:
- action:
action_type: raise_alarm
action_target:
target: instance
properties:
alarm_name: mock_datasource.3rd_degree_scenarios.deduced.alarm2
severity: CRITICAL
- scenario:
condition: host_contains_instance and deduced_alarm_on_instance and second_iteration_deduced_alarm_on_instance
actions:
- action:
action_type: add_causal_relationship
action_target:
source: deduced_alarm
target: second_iteration_deduced_alarm
- scenario:
condition: zabbix_alarm_on_host and host_contains_instance and deduced_alarm_on_instance and second_iteration_deduced_alarm_on_instance
actions:
- action:
action_type: add_causal_relationship
action_target:
source: second_iteration_deduced_alarm
target: zabbix_alarm