Merge "Debian is using Python 3"
This commit is contained in:
commit
5fd1a598f8
|
@ -5,7 +5,12 @@
|
|||
class cloudkitty::params {
|
||||
include ::openstacklib::defaults
|
||||
|
||||
$client_package_name = 'python-cloudkittyclient'
|
||||
if ($::os_package_type == 'debian') {
|
||||
$pyvers = '3'
|
||||
} else {
|
||||
$pyvers = ''
|
||||
}
|
||||
$client_package_name = "python${pyvers}-cloudkittyclient"
|
||||
$api_service_name = 'cloudkitty-api'
|
||||
$processor_service_name = 'cloudkitty-processor'
|
||||
$group = 'cloudkitty'
|
||||
|
|
|
@ -10,7 +10,7 @@ describe 'cloudkitty::client' do
|
|||
it 'installs cloudkitty client package' do
|
||||
is_expected.to contain_package('python-cloudkittyclient').with(
|
||||
:ensure => 'present',
|
||||
:name => 'python-cloudkittyclient',
|
||||
:name => platform_params[:client_package_name],
|
||||
:tag => 'openstack',
|
||||
)
|
||||
end
|
||||
|
@ -24,6 +24,19 @@ describe 'cloudkitty::client' do
|
|||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let(:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
if facts[:os_package_type] == 'debian'
|
||||
{ :client_package_name => 'python3-cloudkittyclient' }
|
||||
else
|
||||
{ :client_package_name => 'python-cloudkittyclient' }
|
||||
end
|
||||
when 'RedHat'
|
||||
{ :client_package_name => 'python-cloudkittyclient' }
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'cloudkitty client'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue