Add parameter to set notification format

Change-Id: Id08b2d5a1e87825b182e767bffc4c15e5ce9968f
This commit is contained in:
Sven Anderson 2017-11-10 17:20:29 +01:00
parent 08eebe9dc9
commit db66ae5197
3 changed files with 13 additions and 0 deletions

View File

@ -305,6 +305,10 @@
# (optional) AMQP topic used for OpenStack notifications
# Defaults to ::os_service_default
#
# [*notification_format*]
# (optional) Format used for OpenStack notifications
# Defaults to ::os_service_default
#
# [*notify_api_faults*]
# (optional) If set, send api.fault notifications on caught
# exceptions in the API service
@ -514,6 +518,7 @@ class nova(
$notification_transport_url = $::os_service_default,
$notification_driver = $::os_service_default,
$notification_topics = $::os_service_default,
$notification_format = $::os_service_default,
$notify_api_faults = false,
$notify_on_state_change = undef,
$os_region_name = $::os_service_default,
@ -751,6 +756,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
'cinder/catalog_info': value => $cinder_catalog_info;
'os_vif_linux_bridge/use_ipv6': value => $use_ipv6;
'notifications/notify_api_faults': value => $notify_api_faults;
'notifications/notification_format': value => $notification_format;
# Following may need to be broken out to different nova services
'DEFAULT/state_path': value => $state_path;
'DEFAULT/service_down_time': value => $service_down_time;

View File

@ -0,0 +1,5 @@
---
features:
- |
Add parameter to set notification format. Specifies which notification
format shall be used by nova.

View File

@ -98,6 +98,7 @@ describe 'nova' do
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'ceilometer.compute.nova_notifier',
:notification_topics => 'openstack',
:notification_format => 'unversioned',
:notify_api_faults => true,
:report_interval => '60',
:os_region_name => 'MyRegion',
@ -180,6 +181,7 @@ describe 'nova' do
is_expected.to contain_nova_config('oslo_messaging_notifications/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_nova_config('oslo_messaging_notifications/driver').with_value('ceilometer.compute.nova_notifier')
is_expected.to contain_nova_config('oslo_messaging_notifications/topics').with_value('openstack')
is_expected.to contain_nova_config('notifications/notification_format').with_value('unversioned')
is_expected.to contain_nova_config('notifications/notify_api_faults').with_value(true)
is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('60')
is_expected.to contain_nova_config('os_vif_linux_bridge/use_ipv6').with_value('true')