metadata:
 name: basic_template
 description: basic template for general tests
definitions:
 entities:
  - entity:
     category: ALARM
     type: nagios
     name: cpu_high
     template_id: cpu_alarm
  - entity:
     category: ALARM
     type: nagios
     name: mem_low
     template_id: mem_alarm
  - entity:
     category: RESOURCE
     type: nova.host
     template_id: host
 relationships:
  - relationship:
     source: cpu_alarm
     target: host
     relationship_type: on
     template_id : cpu_alarm_on_host
  - relationship:
     source: mem_alarm
     target: host
     relationship_type: on
     template_id : mem_alarm_on_host
scenarios:
 - scenario:
    condition: cpu_alarm_on_host or mem_alarm_on_host
    actions:
     - action:
        action_type: set_state
        properties:
         state: SUBOPTIMAL
        action_target:
         target: host
