Inherit pyvers from openstacklib::defaults

Change-Id: I924ed9b5fd2dd1022c33f5352e4d948f73a0f2c1
This commit is contained in:
Tobias Urdin 2019-01-17 22:03:44 +01:00
parent 12143624e8
commit bc8dc5179a
2 changed files with 2 additions and 12 deletions

View File

@ -4,13 +4,7 @@
#
class swift::params {
include ::openstacklib::defaults
if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
$pyvers = '3'
} else {
$pyvers = ''
}
$pyvers = $::openstacklib::defaults::pyvers
$client_package = "python${pyvers}-swiftclient"
$service_provider = undef

View File

@ -40,11 +40,7 @@ describe 'swift::client' do
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
{ :client_package_name => 'python3-swiftclient' }
when 'RedHat'
{ :client_package_name => 'python-swiftclient' }
end