From 3d4f500e6f9dcaa185294622da21454091371402 Mon Sep 17 00:00:00 2001 From: Matthias Bastian Date: Fri, 6 Jul 2018 12:50:35 +0200 Subject: [PATCH] Deprecate aodh::gnocchi_url as it has no effect Usage of the gnocchi_url configuration option was removed from aodh in I41ef467750a403841ad96bfa7607ad63bd55702d. Change-Id: I49f9c44adb3d0dfabfbb701d41c99a8267bed5cf --- manifests/init.pp | 18 ++++++++++++------ ...gnocchi_url-parameter-415f98e9712ed768.yaml | 5 +++++ spec/classes/aodh_init_spec.rb | 2 -- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/deprecate-gnocchi_url-parameter-415f98e9712ed768.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 9c66c678..08eac185 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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; } } diff --git a/releasenotes/notes/deprecate-gnocchi_url-parameter-415f98e9712ed768.yaml b/releasenotes/notes/deprecate-gnocchi_url-parameter-415f98e9712ed768.yaml new file mode 100644 index 00000000..de051985 --- /dev/null +++ b/releasenotes/notes/deprecate-gnocchi_url-parameter-415f98e9712ed768.yaml @@ -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. diff --git a/spec/classes/aodh_init_spec.rb b/spec/classes/aodh_init_spec.rb index 30444723..92189f72 100644 --- a/spec/classes/aodh_init_spec.rb +++ b/spec/classes/aodh_init_spec.rb @@ -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