Enhanced configurability for python client configuration.

This commit is contained in:
John Chilton 2012-05-03 13:51:12 -05:00
parent c944d55e0d
commit 1b36012d55
3 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,8 @@
# This class contains the platform differences for keystone
#
class keystone::params {
$client_package_name = 'python-keystone'
case $::osfamily {
'Debian': {
$package_name = 'keystone'

View File

@ -1,7 +1,11 @@
class keystone::python {
class keystone::python (
$client_package_name = $::keystone::params::client_package_name,
$ensure = 'present',
) {
package { 'python-keystone' :
ensure => present,
name => $client_package_name,
ensure => $ensure,
}
}

View File

@ -6,6 +6,12 @@ describe 'keystone::python' do
{ :osfamily => 'Debian' }
end
it { should contain_package('python-keystone') }
it { should contain_package('python-keystone').with_ensure("present") }
describe 'override ensure' do
let(:params) { { :ensure => "latest" } }
it { should contain_package('python-keystone').with_ensure("latest") }
end
end