Debian is using python3-swiftclient

Change-Id: I64f7fc1a2172f5f4a200a822eb4f617fde65db55
This commit is contained in:
zhubingbing 2018-04-12 11:36:09 +08:00
parent ee3ff43f44
commit 09139955cb
2 changed files with 21 additions and 2 deletions

View File

@ -5,7 +5,13 @@
class swift::params {
include ::openstacklib::defaults
$client_package = 'python-swiftclient'
if ($::os_package_type == 'debian') {
$pyvers = '3'
} else {
$pyvers = ''
}
$client_package = "python${pyvers}-swiftclient"
$service_provider = undef
case $::osfamily {

View File

@ -19,7 +19,7 @@ describe 'swift::client' do
it 'installs swift client package' do
is_expected.to contain_package('swiftclient').with(
:name => 'python-swiftclient',
:name => platform_params[:client_package_name],
:ensure => p[:package_ensure],
:tag => ['openstack','swift-support-package'],
)
@ -37,6 +37,19 @@ describe 'swift::client' do
}))
end
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-swiftclient' }
else
{ :client_package_name => 'python-swiftclient' }
end
when 'RedHat'
{ :client_package_name => 'python-swiftclient' }
end
end
it_configures 'swift client'
end
end