Merge "Debian is using Python 3"

This commit is contained in:
Zuul 2018-04-10 17:03:00 +00:00 committed by Gerrit Code Review
commit 5fd1a598f8
2 changed files with 20 additions and 2 deletions

View File

@ -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'

View File

@ -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