Use connection to replace deprecated database_connection
This patch is aim to use new param connection in [database] section to replace the deprecated option database_connection in [DEFAULT]. Fixes bug #1222744 Change-Id: I82082b791a4c16eb50092b3a96fb8ae439af4e5b
This commit is contained in:
parent
9ac4a3c915
commit
b7f74dfe96
@ -44,10 +44,10 @@ class ceilometer::db (
|
||||
}
|
||||
|
||||
ceilometer_config {
|
||||
'DEFAULT/database_connection': value => $database_connection;
|
||||
'database/connection': value => $database_connection;
|
||||
}
|
||||
|
||||
Ceilometer_config['DEFAULT/database_connection'] ~> Exec['ceilometer-dbsync']
|
||||
Ceilometer_config['database/connection'] ~> Exec['ceilometer-dbsync']
|
||||
|
||||
exec { 'ceilometer-dbsync':
|
||||
command => $::ceilometer::params::dbsync_command,
|
||||
@ -55,7 +55,7 @@ class ceilometer::db (
|
||||
user => $::ceilometer::params::username,
|
||||
refreshonly => true,
|
||||
logoutput => on_failure,
|
||||
subscribe => Ceilometer_config['DEFAULT/database_connection']
|
||||
subscribe => Ceilometer_config['database/connection']
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ describe 'ceilometer::db' do
|
||||
should contain_package('ceilometer-backend-package').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-pymongo')
|
||||
should contain_ceilometer_config('database/connection').with_value('mongodb://localhost:1234/ceilometer')
|
||||
end
|
||||
end
|
||||
|
||||
@ -40,6 +41,7 @@ describe 'ceilometer::db' do
|
||||
should contain_package('ceilometer-backend-package').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-pymongo')
|
||||
should contain_ceilometer_config('database/connection').with_value('mongodb://localhost:1234/ceilometer')
|
||||
end
|
||||
end
|
||||
|
||||
@ -84,6 +86,7 @@ describe 'ceilometer::db' do
|
||||
should contain_package('ceilometer-backend-package').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-sqlite2')
|
||||
should contain_ceilometer_config('database/connection').with_value('sqlite:///var/lib/ceilometer.db')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user