vitrage/vitrage/tests/resources/templates/evaluator/new.yaml

68 lines
1.7 KiB
YAML

metadata:
name: HA_up_instance
description:
definitions:
entities:
- entity:
category: RESOURCE
type: nova.instance
template_id: instance1
- entity:
category: RESOURCE
type: nova.instance
template_id: instance2
- entity:
category: RESOURCE
type: nova.host
template_id: host
- entity:
category: RESOURCE
type: cinder.volume
template_id: volume1
- entity:
category: RESOURCE
type: cinder.volume
template_id: volume2
relationships:
- relationship:
source: host
relationship_type: contains
target: instance1
template_id : host_contains_instance1
- relationship:
source: volume1
relationship_type: attached
target: instance1
template_id : volume_attached_instance1
- relationship:
source: host
relationship_type: contains
target: instance2
template_id : host_contains_instance2
- relationship:
source: volume2
relationship_type: attached
target: instance2
template_id : volume_attached_instance2
scenarios:
- scenario:
condition: (host_contains_instance1 and volume_attached_instance1) and (host_contains_instance2 and not volume_attached_instance2)
actions:
- action:
action_type: raise_alarm
action_target:
target: host
properties:
alarm_name: ha_warning_deduced_alarm
severity: warning
- scenario:
condition: (host_contains_instance1 and volume_attached_instance1) and (host_contains_instance2 and volume_attached_instance2)
actions:
- action:
action_type: raise_alarm
action_target:
target: host
properties:
alarm_name: ha_error_deduced_alarm
severity: error