metadata:
 name: simple_and2
definitions:
 entities:
  - entity:
     category: ALARM
     type: nagios
     name: alarm2
     template_id: alarm2
  - entity:
     category: ALARM
     type: nagios
     name: alarm3
     template_id: alarm3
  - entity:
     category: RESOURCE
     type: nova.host
     template_id: host
  - entity:
     category: RESOURCE
     type: nova.instance
     template_id: instance
 relationships:
  - relationship:
     source: alarm2
     relationship_type: on
     target: instance
     template_id : alarm2_on_instance
  - relationship:
     source: alarm3
     relationship_type: on
     target: instance
     template_id : alarm3_on_instance
  - relationship:
     source: host
     relationship_type: on
     target: instance
     template_id : host_contains_instance
scenarios:
 - scenario:
    condition: alarm2_on_instance and alarm3_on_instance and host_contains_instance
    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
