metadata:
 name: complicated_correct_not_condition_template
 description: basic not condition template for general tests
definitions:
 entities:
  - entity:
     category: RESOURCE
     type: neutron.port
     template_id: port
  - entity:
     category: RESOURCE
     type: nova.zone
     template_id: zone
  - entity:
     category: RESOURCE
     type: nova.host
     template_id: host
  - entity:
     category: RESOURCE
     type: nova.instance
     template_id: instance
  - entity:
     category: ALARM
     type: nova.host
     name: HOST_HIGH_CPU_LOAD
     template_id: alarm
 relationships:
  - relationship:
     source: zone
     target: host
     relationship_type: contains
     template_id : zone_contains_host
  - relationship:
     source: host
     target: instance
     relationship_type: contains
     template_id : host_contains_instance
  - relationship:
     source: port
     target: instance
     relationship_type: attached
     template_id : port_attached_instance
  - relationship:
     source: alarm
     target: instance
     relationship_type: on
     template_id : alarm_on_instance
scenarios:
 - scenario:
     condition: alarm_on_instance or host_contains_instance and not zone_contains_host or port_attached_instance and not zone_contains_host
     actions:
      - action:
         action_type: set_state
         properties:
          state: SUBOPTIMAL
         action_target:
          target: host
