Skip to content

Commit

Permalink
Move service polling credentials to service_credentials
Browse files Browse the repository at this point in the history
Change-Id: I74a523bcc1acd18532bb9353b70da63c70e8e325
Closes-bug: #1287939
(cherry picked from commit 160b5ed)
  • Loading branch information
mgagne committed Mar 5, 2014
1 parent fa5a6ee commit 3e3c021
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions manifests/agent/auth.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@
) {

if ! $auth_cacert {
ceilometer_config { 'DEFAULT/os_cacert': ensure => absent }
ceilometer_config { 'service_credentials/os_cacert': ensure => absent }
} else {
ceilometer_config { 'DEFAULT/os_cacert': value => $auth_cacert }
ceilometer_config { 'service_credentials/os_cacert': value => $auth_cacert }
}

ceilometer_config {
'DEFAULT/os_auth_url' : value => $auth_url;
'DEFAULT/os_auth_region' : value => $auth_region;
'DEFAULT/os_username' : value => $auth_user;
'DEFAULT/os_password' : value => $auth_password;
'DEFAULT/os_tenant_name' : value => $auth_tenant_name;
'service_credentials/os_auth_url' : value => $auth_url;
'service_credentials/os_auth_region' : value => $auth_region;
'service_credentials/os_username' : value => $auth_user;
'service_credentials/os_password' : value => $auth_password;
'service_credentials/os_tenant_name' : value => $auth_tenant_name;
}

if ($auth_tenant_id != '') {
ceilometer_config {
'DEFAULT/os_tenant_id' : value => $auth_tenant_id;
'service_credentials/os_tenant_id' : value => $auth_tenant_id;
}
}

Expand Down
14 changes: 7 additions & 7 deletions spec/classes/ceilometer_agent_auth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
shared_examples_for 'ceilometer-agent-auth' do

it 'configures authentication' do
should contain_ceilometer_config('DEFAULT/os_auth_url').with_value('http://localhost:5000/v2.0')
should contain_ceilometer_config('DEFAULT/os_auth_region').with_value('RegionOne')
should contain_ceilometer_config('DEFAULT/os_username').with_value('ceilometer')
should contain_ceilometer_config('DEFAULT/os_password').with_value('password')
should contain_ceilometer_config('DEFAULT/os_tenant_name').with_value('services')
should contain_ceilometer_config('DEFAULT/os_cacert').with(:ensure => 'absent')
should contain_ceilometer_config('service_credentials/os_auth_url').with_value('http://localhost:5000/v2.0')
should contain_ceilometer_config('service_credentials/os_auth_region').with_value('RegionOne')
should contain_ceilometer_config('service_credentials/os_username').with_value('ceilometer')
should contain_ceilometer_config('service_credentials/os_password').with_value('password')
should contain_ceilometer_config('service_credentials/os_tenant_name').with_value('services')
should contain_ceilometer_config('service_credentials/os_cacert').with(:ensure => 'absent')
end

context 'when overriding parameters' do
before do
params.merge!(:auth_cacert => '/tmp/dummy.pem')
end
it { should contain_ceilometer_config('DEFAULT/os_cacert').with_value(params[:auth_cacert]) }
it { should contain_ceilometer_config('service_credentials/os_cacert').with_value(params[:auth_cacert]) }
end

end
Expand Down

0 comments on commit 3e3c021

Please sign in to comment.