Merge "Add rmq credentials to each host in proxy"
This commit is contained in:
		| @@ -78,6 +78,10 @@ class swift::proxy::ceilometer( | ||||
|   $group               = 'ceilometer', | ||||
| ) inherits swift { | ||||
|  | ||||
|   if(is_array($rabbit_hosts)) { | ||||
|     $rabbit_hosts_with_creds = prefix($rabbit_hosts, "${rabbit_user}:${rabbit_password}@") | ||||
|   } | ||||
|  | ||||
|   User['swift'] { | ||||
|     groups +> $group, | ||||
|   } | ||||
|   | ||||
| @@ -64,7 +64,7 @@ describe 'swift::proxy::ceilometer' do | ||||
|       it { is_expected.to contain_user('swift').with_groups('www-data') } | ||||
|       it { is_expected.to contain_file(fragment_file).with_content(/[filter:ceilometer]/) } | ||||
|       it { is_expected.to contain_file(fragment_file).with_content(/paste.filter_factory = ceilometermiddleware.swift:filter_factory/) } | ||||
|       it { is_expected.to contain_file(fragment_file).with_content(/url = rabbit:\/\/user_1:user_1_passw@127.0.0.1:5672,127.0.0.2:5672\/rabbit/) } | ||||
|       it { is_expected.to contain_file(fragment_file).with_content(/url = rabbit:\/\/user_1:user_1_passw@127.0.0.1:5672,user_1:user_1_passw@127.0.0.2:5672\/rabbit/) } | ||||
|       it { is_expected.to contain_file(fragment_file).with_content(/driver = messagingv2/) } | ||||
|       it { is_expected.to contain_file(fragment_file).with_content(/topic = notifications/) } | ||||
|       it { is_expected.to contain_file(fragment_file).with_content(/control_exchange = swift/) } | ||||
|   | ||||
| @@ -4,8 +4,8 @@ paste.filter_factory = ceilometermiddleware.swift:filter_factory | ||||
| <% if @rabbit_hosts.nil? %> | ||||
| url = rabbit://<%= @rabbit_user %>:<%= @rabbit_password %>@<%= @rabbit_host %>:<%= @rabbit_port %>/<%= @rabbit_virtual_host %> | ||||
| <% else %> | ||||
| <% hosts=Array(@rabbit_hosts).join(",") -%> | ||||
| url = rabbit://<%= @rabbit_user %>:<%= @rabbit_password %>@<%= hosts %>/<%= @rabbit_virtual_host %> | ||||
| <% hosts=Array(@rabbit_hosts_with_creds).join(",") -%> | ||||
| url = rabbit://<%= hosts %>/<%= @rabbit_virtual_host %> | ||||
| <% end %> | ||||
| <% if @driver %> | ||||
| driver = <%= @driver %> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jenkins
					Jenkins