Browse Source

Debian is using Python 3

Change-Id: I50b2928ffc1bc1af8a877d37f14d1cef7d9b3c37
changes/30/559430/2
Thomas Goirand 4 years ago
parent
commit
fd58ca57ed
  1. 9
      manifests/params.pp
  2. 17
      spec/defines/oslo_cache_spec.rb

9
manifests/params.pp

@ -5,8 +5,13 @@
class oslo::params {
include ::openstacklib::defaults
$pymongo_package_name = 'python-pymongo'
$pylibmc_package_name = 'python-pylibmc'
if ($::os_package_type == 'debian') {
$pyvers = '3'
} else {
$pyvers = ''
}
$pymongo_package_name = "python${pyvers}-pymongo"
$pylibmc_package_name = "python${pyvers}-pylibmc"
case $::osfamily {
'RedHat': {

17
spec/defines/oslo_cache_spec.rb

@ -142,11 +142,24 @@ describe 'oslo::cache' do
facts.merge!(OSDefaults.get_facts())
end
let(:platform_params) do
platform_params = { :pylibmc_package_name => 'python-pylibmc' }
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
platform_params = { :pylibmc_package_name => 'python3-pylibmc' }
else
platform_params = { :pylibmc_package_name => 'python-pylibmc' }
end
when 'RedHat'
platform_params = { :pylibmc_package_name => 'python-pylibmc' }
end
case facts[:osfamily]
when 'Debian'
platform_params[:python_memcache_package_name] = 'python-memcache'
if facts[:os_package_type] == 'debian'
platform_params[:python_memcache_package_name] = 'python3-memcache'
else
platform_params[:python_memcache_package_name] = 'python-memcache'
end
when 'RedHat'
platform_params[:python_memcache_package_name] = 'python-memcached'
end

Loading…
Cancel
Save