Fix the backend for data collection
Change-Id: I1632007e472fccd54d9cfb78f5ee04ab5a31f612
This commit is contained in:
parent
207558fc33
commit
1374778768
@ -81,4 +81,15 @@ class cloudkitty::processor (
|
||||
'collect/services': value => $services;
|
||||
}
|
||||
|
||||
if !is_service_default($collector) and !empty($collector){
|
||||
warning('Valid values of the collector option are ceilometer and gnocchi')
|
||||
cloudkitty_config{
|
||||
'gnocchi_collector/auth_section': value => 'keystone_authtoken';
|
||||
}
|
||||
} else{
|
||||
cloudkitty_config {
|
||||
'gnocchi_collector/auth_section': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,6 +43,17 @@ describe 'cloudkitty::processor' do
|
||||
|
||||
end
|
||||
|
||||
context 'with gnocchi backend' do
|
||||
before do
|
||||
params.merge!({
|
||||
:collector => 'gnocchi',
|
||||
})
|
||||
end
|
||||
|
||||
it { is_expected.to contain_cloudkitty_config('collect/collector').with_value( params[:collector] ) }
|
||||
it { is_expected.to contain_cloudkitty_config('gnocchi_collector/auth_section').with_value('keystone_authtoken') }
|
||||
end
|
||||
|
||||
context 'when disabled' do
|
||||
let :params do
|
||||
{ :enabled => false }
|
||||
|
Loading…
Reference in New Issue
Block a user