From 985b2ee77f48d2263b563c0420319eb53cc5efb3 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 28 Jan 2016 13:04:24 -0500 Subject: [PATCH] Implement gnocchi_url parameter If we want Aodh able to talk to Gnocchi API, we need to configure DEFAULT/gnocchi_url parameter in Aodh configuration. This patch aims to do that. Change-Id: Ib818b5ae4fa301c6c496fe800ae45c9b0a73222c --- manifests/init.pp | 6 ++++++ spec/classes/aodh_init_spec.rb | 2 ++ 2 files changed, 8 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 93ab7de1..58537dd0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -165,6 +165,10 @@ # (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. +# # DEPRECATED PARAMETERS # # [*qpid_hostname*] @@ -234,6 +238,7 @@ class aodh ( $database_max_retries = undef, $database_retry_interval = undef, $database_max_overflow = undef, + $gnocchi_url = $::os_service_default, # DEPRECATED PARAMETERS $qpid_hostname = undef, $qpid_port = undef, @@ -348,6 +353,7 @@ class aodh ( aodh_config { 'DEFAULT/rpc_backend': value => $rpc_backend; 'DEFAULT/notification_topics': value => $notification_topics; + 'DEFAULT/gnocchi_url': value => $gnocchi_url; } } diff --git a/spec/classes/aodh_init_spec.rb b/spec/classes/aodh_init_spec.rb index e0bbbbc8..9ee45b55 100644 --- a/spec/classes/aodh_init_spec.rb +++ b/spec/classes/aodh_init_spec.rb @@ -42,6 +42,7 @@ describe 'aodh' do :rabbit_heartbeat_timeout_threshold => '60', :rabbit_heartbeat_rate => '10', :ensure_package => '2012.1.1-15.el6', + :gnocchi_url => 'http://127.0.0.1:8041', :notification_driver => 'ceilometer.compute.aodh_notifier', :notification_topics => 'openstack' } end @@ -60,6 +61,7 @@ describe 'aodh' do it 'configures various things' do is_expected.to contain_aodh_config('DEFAULT/notification_driver').with_value('ceilometer.compute.aodh_notifier') is_expected.to contain_aodh_config('DEFAULT/notification_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