telemetry: fix manifest + unit tests
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
@@ -23,6 +23,7 @@ class privatecloud::telemetry(
|
|||||||
$ks_keystone_internal_host = $os_params::ks_keystone_internal_host,
|
$ks_keystone_internal_host = $os_params::ks_keystone_internal_host,
|
||||||
$ks_keystone_internal_port = $os_params::ks_keystone_internal_port,
|
$ks_keystone_internal_port = $os_params::ks_keystone_internal_port,
|
||||||
$ks_keystone_internal_proto = $os_params::ks_keystone_internal_proto,
|
$ks_keystone_internal_proto = $os_params::ks_keystone_internal_proto,
|
||||||
|
$ks_ceilometer_password = $os_params::ks_ceilometer_password,
|
||||||
$verbose = $os_params::verbose,
|
$verbose = $os_params::verbose,
|
||||||
$debug = $os_params::debug,
|
$debug = $os_params::debug,
|
||||||
){
|
){
|
||||||
@@ -43,7 +44,7 @@ class privatecloud::telemetry(
|
|||||||
|
|
||||||
class { 'ceilometer::agent::auth':
|
class { 'ceilometer::agent::auth':
|
||||||
auth_url => "${ks_keystone_internal_proto}://${ks_keystone_internal_host}:${ks_keystone_internal_port}/v2.0",
|
auth_url => "${ks_keystone_internal_proto}://${ks_keystone_internal_host}:${ks_keystone_internal_port}/v2.0",
|
||||||
auth_password => $os_params::ks_ceilometer_password,
|
auth_password => $ks_ceilometer_password,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -30,15 +30,18 @@ describe 'privatecloud::telemetry::server' do
|
|||||||
ks_keystone_internal_host => '10.0.0.1',
|
ks_keystone_internal_host => '10.0.0.1',
|
||||||
ks_keystone_internal_port => '5000',
|
ks_keystone_internal_port => '5000',
|
||||||
ks_keystone_internal_proto => 'http',
|
ks_keystone_internal_proto => 'http',
|
||||||
|
ks_ceilometer_password => 'secrete',
|
||||||
verbose => true,
|
verbose => true,
|
||||||
debug => true }"
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :ks_keystone_internal_host => '10.0.0.1',
|
{ :ks_keystone_internal_host => '10.0.0.1',
|
||||||
:ks_nova_password => 'secrete',
|
:ks_keystone_internal_proto => 'http',
|
||||||
|
:ks_ceilometer_internal_port => '8777',
|
||||||
|
:ks_ceilometer_password => 'secrete',
|
||||||
:api_eth => '10.0.0.1',
|
:api_eth => '10.0.0.1',
|
||||||
:neutron_metadata_proxy_shared_secret => 'secrete' }
|
:ceilometer_database_connection => 'mongodb://10.0.0.2/ceilometer' }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configure ceilometer common' do
|
it 'configure ceilometer common' do
|
||||||
@@ -55,21 +58,43 @@ describe 'privatecloud::telemetry::server' do
|
|||||||
:auth_url => 'http://10.0.0.1:5000/v2.0'
|
:auth_url => 'http://10.0.0.1:5000/v2.0'
|
||||||
)
|
)
|
||||||
should contain_ceilometer_config('DEFAULT/syslog_log_facility').with('value' => 'LOG_LOCAL0')
|
should contain_ceilometer_config('DEFAULT/syslog_log_facility').with('value' => 'LOG_LOCAL0')
|
||||||
should contain_ceilometer_config('DEFAULT/user_syslog').with('value' => 'yes')
|
should contain_ceilometer_config('DEFAULT/use_syslog').with('value' => 'yes')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configure nova-scheduler' do
|
it 'configure ceilometer db' do
|
||||||
should contain_class('nova::scheduler').with(:enabled => true)
|
should contain_class('ceilometer::db').with(
|
||||||
|
:database_connection => 'mongodb://10.0.0.2/ceilometer'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configure ceilometer collector' do
|
||||||
|
should contain_class('ceilometer::collector')
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configure ceilometer alarm evaluator' do
|
||||||
|
should contain_class('ceilometer::alarm::evaluator')
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configure ceilometer alarm notifier' do
|
||||||
|
should contain_class('ceilometer::alarm::notifier')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configure ceilometer-api' do
|
it 'configure ceilometer-api' do
|
||||||
should contain_class('ceilometer::api').with(
|
should contain_class('ceilometer::api').with(
|
||||||
:auth_host => '10.0.0.1',
|
:keystone_password => 'secrete',
|
||||||
:admin_password => 'secrete',
|
:keystone_host => '10.0.0.1',
|
||||||
:api_bind_address => '10.0.0.1',
|
:keystone_protocol => 'http',
|
||||||
:neutron_metadata_proxy_shared_secret => 'secrete'
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'configure ceilometer-expirer' do
|
||||||
|
should contain_class('ceilometer::expirer').with(
|
||||||
|
:time_to_live => '2592000',
|
||||||
|
:minute => '0',
|
||||||
|
:hour => '0',
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
|
Reference in New Issue
Block a user