metadata:
 name: complex2
definitions:
 entities:
  - entity:
     category: ALARM
     type: zabbix
     name: alarm4
     severity: WARNING
     template_id: alarm4
  - entity:
     category: ALARM
     type: zabbix
     name: alarm5
     severity: WARNING
     template_id: alarm5
  - entity:
     category: RESOURCE
     type: nova.instance
     template_id: instance
  - entity:
     category: RESOURCE
     type: nova.host
     template_id: host
 relationships:
  - relationship:
     source: alarm4
     relationship_type: on
     target: instance
     template_id : alarm4_on_instance
  - relationship:
     source: alarm5
     relationship_type: on
     target: host
     template_id : alarm5_on_host
  - relationship:
     source: alarm4
     relationship_type: on
     target: host
     template_id : alarm4_on_host
scenarios:
 - scenario:
    condition: alarm4_on_host or (alarm4_on_instance and alarm5_on_host)
    actions:
     - action:
        action_type: raise_alarm
        properties:
         alarm_name: alarmx
         severity: WARNING
        action_target:
         target: instance
     - action:
        action_type: execute_mistral
        properties:
         workflow: wf_3
