Support configuration of notify_on without Ceilometer
Change-Id: Ie8a81a38359c51ac6dc148aac98d23ddaecd878a
diff --git a/nova/files/liberty/nova-compute.conf.Debian b/nova/files/liberty/nova-compute.conf.Debian
index 9ed941e..acb4679 100644
--- a/nova/files/liberty/nova-compute.conf.Debian
+++ b/nova/files/liberty/nova-compute.conf.Debian
@@ -87,13 +87,18 @@
service_down_time = 90
{% if pillar.ceilometer is defined %}
-
instance_usage_audit = True
instance_usage_audit_period = hour
-notify_on_state_change = vm_and_task_state
-
{% endif %}
+{%- if compute.get('notification', {}).notify_on is defined %}
+{%- for key, value in compute.notification.notify_on.iteritems() %}
+notify_on_{{ key }} = {{ value }}
+{%- endfor %}
+{%- elif pillar.ceilometer is defined %}
+notify_on_state_change = vm_and_task_state
+{%- endif %}
+
{%- if compute.notification is defined %}
notification_driver = {{ compute.notification.driver }}
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index 63bea52..3cd526e 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -52,11 +52,17 @@
service_down_time = 90
{% if pillar.ceilometer is defined %}
-
instance_usage_audit = True
instance_usage_audit_period = hour
+{%- endif %}
+
+{%- if compute.get('notification', {}).notify_on is defined %}
+{%- for key, value in compute.notification.notify_on.iteritems() %}
+notify_on_{{ key }} = {{ value }}
+{%- endfor %}
+{%- elif pillar.ceilometer is defined %}
notify_on_state_change = vm_and_task_state
-{% endif %}
+{%- endif %}
[oslo_concurrency]
lock_path = /var/lib/nova/tmp