Merge "Deprecate aodh::gnocchi_url as it has no effect"

This commit is contained in:
Zuul 2018-07-10 03:50:56 +00:00 committed by Gerrit Code Review
commit 0a08281fa0
3 changed files with 17 additions and 8 deletions

View File

@ -224,15 +224,17 @@
# (optional) If set, use this value for max_overflow with sqlalchemy.
# Defaults to: undef.
#
# [*gnocchi_url*]
# (optional) URL to Gnocchi.
# Defaults to: $::os_service_default.
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the aodh config.
# Defaults to false.
#
# DEPRECATED PARAMETERS
#
# [*gnocchi_url*]
# (optional) URL to Gnocchi.
# Defaults to undef.
#
class aodh (
$package_ensure = 'present',
$alarm_history_time_to_live = $::os_service_default,
@ -283,14 +285,19 @@ class aodh (
$database_max_retries = undef,
$database_retry_interval = undef,
$database_max_overflow = undef,
$gnocchi_url = $::os_service_default,
$purge_config = false,
# DEPRECATED PARAMETERS
$gnocchi_url = $undef,
) inherits aodh::params {
include ::aodh::deps
include ::aodh::db
include ::aodh::logging
if $gnocchi_url {
warning('gnocchi_url has no effect as of Newton and will be removed in a future release')
}
package { 'aodh':
ensure => $package_ensure,
name => $::aodh::params::common_package_name,
@ -348,7 +355,6 @@ class aodh (
}
aodh_config {
'DEFAULT/gnocchi_url': value => $gnocchi_url;
'database/alarm_history_time_to_live': value => $alarm_history_time_to_live;
}
}

View File

@ -0,0 +1,5 @@
---
deprecations:
- aodh::gnocchi_url is deprecated and will be removed in a future
release. The correct URL is automatically retrieved from the indentity
service's service catalog.

View File

@ -55,7 +55,6 @@ describe 'aodh' do
:rabbit_heartbeat_rate => '10',
:kombu_compression => 'gzip',
:package_ensure => '2012.1.1-15.el6',
:gnocchi_url => 'http://127.0.0.1:8041',
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'ceilometer.compute.aodh_notifier',
:notification_topics => 'openstack',
@ -75,7 +74,6 @@ describe 'aodh' do
is_expected.to contain_aodh_config('oslo_messaging_notifications/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_aodh_config('oslo_messaging_notifications/driver').with_value('ceilometer.compute.aodh_notifier')
is_expected.to contain_aodh_config('oslo_messaging_notifications/topics').with_value('openstack')
is_expected.to contain_aodh_config('DEFAULT/gnocchi_url').with_value('http://127.0.0.1:8041')
end
context 'with multiple notification_driver' do