Debian is using Python 3
Change-Id: I98d1a456cad73c83f13a08b42fcf363fea87c66d
This commit is contained in:
@@ -5,7 +5,12 @@
|
|||||||
class cloudkitty::params {
|
class cloudkitty::params {
|
||||||
include ::openstacklib::defaults
|
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'
|
$api_service_name = 'cloudkitty-api'
|
||||||
$processor_service_name = 'cloudkitty-processor'
|
$processor_service_name = 'cloudkitty-processor'
|
||||||
$group = 'cloudkitty'
|
$group = 'cloudkitty'
|
||||||
|
@@ -10,7 +10,7 @@ describe 'cloudkitty::client' do
|
|||||||
it 'installs cloudkitty client package' do
|
it 'installs cloudkitty client package' do
|
||||||
is_expected.to contain_package('python-cloudkittyclient').with(
|
is_expected.to contain_package('python-cloudkittyclient').with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:name => 'python-cloudkittyclient',
|
:name => platform_params[:client_package_name],
|
||||||
:tag => 'openstack',
|
:tag => 'openstack',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@@ -24,6 +24,19 @@ describe 'cloudkitty::client' do
|
|||||||
facts.merge!(OSDefaults.get_facts())
|
facts.merge!(OSDefaults.get_facts())
|
||||||
end
|
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'
|
it_configures 'cloudkitty client'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user