diff --git a/manifests/proxy/ceilometer.pp b/manifests/proxy/ceilometer.pp index 029eb379..ee749d71 100644 --- a/manifests/proxy/ceilometer.pp +++ b/manifests/proxy/ceilometer.pp @@ -58,6 +58,42 @@ # Whether to send events to messaging driver in a background thread # Defaults to false # +# [*ignore_projects*] +# What projects to ignore to send events to ceilometer +# Defaults to ['services'] +# +# [*auth_uri*] +# (Optional) Complete public Identity API endpoint. +# Defaults to 'http://127.0.0.1:5000' +# +# [*auth_url*] +# (Optional) The URL to use for authentication. +# Defaults to 'http://127.0.0.1:35357' +# +# [*auth_type*] +# (Optional) The plugin for authentication +# Defaults to 'password' +# +# [*project_name*] +# (Optional) Service project name +# Defaults to 'services' +# +# [*project_domain_name*] +# (Optional) name of domain for $project_name +# Defaults to 'default' +# +# [*user_domain_name*] +# (Optional) name of domain for $username +# Defaults to 'default' +# +# [*username*] +# (Optional) The name of the service user +# Defaults to 'swift' +# +# [*password*] +# (Optional) The password for the user +# Defaults to 'password' +# # == Examples # # == Authors @@ -81,6 +117,15 @@ class swift::proxy::ceilometer( $ensure = 'present', $group = 'ceilometer', $nonblocking_notify = false, + $ignore_projects = ['services'], + $auth_uri = 'http://127.0.0.1:5000', + $auth_url = 'http://127.0.0.1:35357', + $auth_type = 'password', + $project_domain_name = 'Default', + $user_domain_name = 'Default', + $project_name = 'services', + $username = 'swift', + $password = 'password', ) inherits swift { include ::swift::deps diff --git a/releasenotes/notes/add-ignore-projects-b1ab3629320a39ed.yaml b/releasenotes/notes/add-ignore-projects-b1ab3629320a39ed.yaml new file mode 100644 index 00000000..4feeb1a3 --- /dev/null +++ b/releasenotes/notes/add-ignore-projects-b1ab3629320a39ed.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - Add ignore projects setting to filter:ceilometer in proxy server config. diff --git a/spec/classes/swift_proxy_ceilometer_spec.rb b/spec/classes/swift_proxy_ceilometer_spec.rb index 586fbd64..0c6e5ec7 100644 --- a/spec/classes/swift_proxy_ceilometer_spec.rb +++ b/spec/classes/swift_proxy_ceilometer_spec.rb @@ -33,6 +33,15 @@ describe 'swift::proxy::ceilometer' do :topic => 'notifications', :control_exchange => 'swift', :nonblocking_notify => true, + :ignore_projects => 'services', + :auth_uri => 'http://127.0.0.1:5000', + :auth_url => 'http://127.0.0.1:35357', + :auth_type => 'password', + :project_domain_name => 'Default', + :user_domain_name => 'Default', + :project_name => 'services', + :username => 'swift', + :password => 'password', } end @@ -45,6 +54,15 @@ describe 'swift::proxy::ceilometer' do it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/topic = notifications/) } it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/control_exchange = swift/) } it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/nonblocking_notify = true/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/ignore_projects = services/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/auth_uri = http:\/\/127.0.0.1:5000/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/auth_url = http:\/\/127.0.0.1:35357/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/auth_type = password/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/project_domain_name = Default/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/user_domain_name = Default/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/project_name = services/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/username = swift/) } + it { is_expected.to contain_concat_fragment('swift_ceilometer').with_content(/password = password/) } end context 'with multiple rabbit hosts' do diff --git a/templates/proxy/ceilometer.conf.erb b/templates/proxy/ceilometer.conf.erb index df6d7d24..99734857 100644 --- a/templates/proxy/ceilometer.conf.erb +++ b/templates/proxy/ceilometer.conf.erb @@ -19,3 +19,30 @@ control_exchange = <%= @control_exchange %> <% if @nonblocking_notify %> nonblocking_notify = <%= @nonblocking_notify %> <% end %> +<% if @ignore_projects %> +ignore_projects = <%= @ignore_projects %> +<% end %> +<% if @auth_uri %> +auth_uri = <%= @auth_uri %> +<% end %> +<% if @auth_url %> +auth_url = <%= @auth_url %> +<% end %> +<% if @auth_type %> +auth_type = <%= @auth_type %> +<% end %> +<% if @project_name %> +project_name = <%= @project_name %> +<% end %> +<% if @project_domain_name %> +project_domain_name = <%= @project_domain_name %> +<% end %> +<% if @user_domain_name %> +user_domain_name = <%= @user_domain_name %> +<% end %> +<% if @username %> +username = <%= @username %> +<% end %> +<% if @password %> +password = <%= @password %> +<% end %>