Skip to content

Commit

Permalink
Updates to params.pp for mongo and postgres packages
Browse files Browse the repository at this point in the history
*) Removed the hardcoded postgres package from db.pp
*) Changed the mongo package to python-pymongo for RHEL

Change-Id: Ib975f9ce03ee8ffa423e75b62b595bcdefdd1eed
Signed-off-by: Francesco Vollero <[email protected]>
(cherry picked from commit 0fb3b8f)
  • Loading branch information
razorinc authored and Emilien Macchi committed Dec 8, 2013
1 parent 0bd24d0 commit c9c9ad5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions manifests/db.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
$backend_package = false
include mysql::python
}
/^postgresql:\/\//: {
$backend_package = 'python-psycopg2'
/^postgres:\/\//: {
$backend_package = $::ceilometer::params::psycopg_package_name
}
/^mongodb:\/\//: {
$backend_package = $::ceilometer::params::pymongo_package_name
Expand Down
28 changes: 14 additions & 14 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,27 @@
case $::osfamily {
'RedHat': {
# package names
$agent_central_package_name = 'openstack-ceilometer-central'
$agent_compute_package_name = 'openstack-ceilometer-compute'
$api_package_name = 'openstack-ceilometer-api'
$collector_package_name = 'openstack-ceilometer-collector'
$alarm_package_name = 'openstack-ceilometer-alarm'
$common_package_name = 'openstack-ceilometer-common'
$client_package_name = 'python-ceilometerclient'
$agent_central_package_name = 'openstack-ceilometer-central'
$agent_compute_package_name = 'openstack-ceilometer-compute'
$api_package_name = 'openstack-ceilometer-api'
$collector_package_name = 'openstack-ceilometer-collector'
$alarm_package_name = 'openstack-ceilometer-alarm'
$common_package_name = 'openstack-ceilometer-common'
$client_package_name = 'python-ceilometerclient'
# service names
$agent_central_service_name = 'openstack-ceilometer-central'
$agent_compute_service_name = 'openstack-ceilometer-compute'
$api_service_name = 'openstack-ceilometer-api'
$collector_service_name = 'openstack-ceilometer-collector'
$agent_central_service_name = 'openstack-ceilometer-central'
$agent_compute_service_name = 'openstack-ceilometer-compute'
$api_service_name = 'openstack-ceilometer-api'
$collector_service_name = 'openstack-ceilometer-collector'
$alarm_notifier_service_name = 'openstack-ceilometer-alarm-notifier'
$alarm_evaluator_service_name = 'openstack-ceilometer-alarm-evaluator'
$pymongo_package_name = 'python-pymongo'
$psycopg_package_name = 'python-psycopg2'
# db packages
if $::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18 {
# name change in f18 : https://bugzilla.redhat.com/show_bug.cgi?id=954155
$pymongo_package_name = 'python-pymongo'
# fallback to stdlib version, not provided on fedora
$sqlite_package_name = undef
} else {
$pymongo_package_name = 'pymongo'
$sqlite_package_name = 'python-sqlite2'
}

Expand All @@ -52,6 +51,7 @@
$alarm_notifier_service_name = 'ceilometer-alarm-notifier'
$alarm_evaluator_service_name = 'ceilometer-alarm-evaluator'
# db packages
$psycopg_package_name = 'python-psycopg2'
$pymongo_package_name = 'python-pymongo'
$sqlite_package_name = 'python-pysqlite2'

Expand Down
4 changes: 2 additions & 2 deletions spec/classes/ceilometer_db_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
end
end

# RHEL has pymongo
# RHEL has python-pymongo too
context 'on Redhat platforms' do
let :facts do
{ :osfamily => 'Redhat',
Expand All @@ -63,7 +63,7 @@
it 'installs pymongo package' do
should contain_package('ceilometer-backend-package').with(
:ensure => 'present',
:name => 'pymongo')
:name => 'python-pymongo')
end
end

Expand Down

0 comments on commit c9c9ad5

Please sign in to comment.