Debian is using Python 3

Change-Id: I115e40289781801f40a5cf489e2cc1a43a35da1c
This commit is contained in:
Thomas Goirand 2018-04-06 23:16:29 +02:00
parent e3da95861d
commit da6e5c65a8
2 changed files with 20 additions and 2 deletions

View File

@ -5,7 +5,12 @@
class heat::params {
include ::openstacklib::defaults
$client_package_name = 'python-heatclient'
if ($::os_package_type == 'debian') {
$pyvers = '3'
} else {
$pyvers = ''
}
$client_package_name = "python${pyvers}-heatclient"
$group = 'heat'
case $::osfamily {

View File

@ -19,7 +19,7 @@ describe 'heat::client' do
it 'installs heat client package' do
is_expected.to contain_package('python-heatclient').with(
:name => 'python-heatclient',
:name => platform_params[:client_package_name],
:ensure => p[:package_ensure],
:tag => 'openstack'
)
@ -35,6 +35,19 @@ describe 'heat::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-heatclient' }
else
{ :client_package_name => 'python-heatclient' }
end
when 'RedHat'
{ :client_package_name => 'python-heatclient' }
end
end
it_behaves_like 'heat client'
end
end