metadata:
 name: complex_correct_not_condition_template
 description: complex not condition template for general tests
definitions:
 entities:
  - entity:
     category: ALARM
     type: nagios
     name: NETWORK_PROBLEM
     template_id: network_alarm
  - entity:
     category: ALARM
     type: nagios
     name: CLUSTER_PROBLEM
     template_id: cluster_alarm
  - entity:
     category: RESOURCE
     type: nova.zone
     template_id: nova_zone
  - entity:
     category: RESOURCE
     type: openstack.cluster
     template_id: openstack_cluster
  - entity:
     category: RESOURCE
     type: neutron.network
     template_id: neutron_network
 relationships:
  - relationship:
     source: cluster_alarm
     target: openstack_cluster
     relationship_type: on
     template_id : alarm_on_cluster
  - relationship:
     source: openstack_cluster
     target: nova_zone
     relationship_type: contains
     template_id : cluster_contains_zone
  - relationship:
     source: neutron_network
     target: nova_zone
     relationship_type: attached
     template_id : network_attached_zone
  - relationship:
     source: network_alarm
     target: neutron_network
     relationship_type: on
     template_id : alarm_on_network
scenarios:
 - scenario:
    condition: cluster_contains_zone and network_attached_zone and not alarm_on_cluster and not alarm_on_network
    actions:
     - action:
        action_type: raise_alarm
        properties:
         alarm_name: complex_zone_deduced_alarm
         severity: WARNING
        action_target:
         target: nova_zone
