Browse Source

Get rid of the $pyvers variable

Since everyone has switched to Python3, it's time for the removal of the
$pyvers variable.

Change-Id: Id2e98924bf27efa0fae98519b9b17940644e95d7
changes/69/792569/7
Thomas Goirand 2 months ago
committed by Takashi Kajinami
parent
commit
3a51feed89
  1. 27
      manifests/params.pp
  2. 14
      spec/defines/oslo_cache_spec.rb
  3. 18
      spec/defines/oslo_coordination_spec.rb
  4. 26
      spec/defines/oslo_db_spec.rb

27
manifests/params.pp

@ -4,29 +4,28 @@
#
class oslo::params {
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$pymongo_package_name = "python${pyvers}-pymongo"
$pylibmc_package_name = "python${pyvers}-pylibmc"
$pymongo_package_name = 'python3-pymongo'
$pylibmc_package_name = 'python3-pylibmc'
case $::osfamily {
'RedHat': {
$sqlite_package_name = undef
$pymysql_package_name = undef
$python_memcache_package_name = "python${pyvers}-memcached"
$python_redis_package_name = "python${pyvers}-redis"
$python_etcd3gw_package_name = "python${pyvers}-etcd3gw"
$python_memcache_package_name = 'python3-memcached'
$python_redis_package_name = 'python3-redis'
$python_etcd3gw_package_name = 'python3-etcd3gw'
$python_etcd3_package_name = undef
$python_pymemcache_package_name = "python${pyvers}-pymemcache"
$python_pymemcache_package_name = 'python3-pymemcache'
}
'Debian': {
$sqlite_package_name = "python${pyvers}-pysqlite2"
$pymysql_package_name = "python${pyvers}-pymysql"
$python_memcache_package_name = "python${pyvers}-memcache"
$python_redis_package_name = "python${pyvers}-redis"
$python_etcd3gw_package_name = "python${pyvers}-etcd3gw"
$python_etcd3_package_name = "python${pyvers}-etcd3"
$python_pymemcache_package_name = "python${pyvers}-pymemcache"
$sqlite_package_name = 'python3-pysqlite2'
$pymysql_package_name = 'python3-pymysql'
$python_memcache_package_name = 'python3-memcache'
$python_redis_package_name = 'python3-redis'
$python_etcd3gw_package_name = 'python3-etcd3gw'
$python_etcd3_package_name = 'python3-etcd3'
$python_pymemcache_package_name = 'python3-pymemcache'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \

14
spec/defines/oslo_cache_spec.rb

@ -163,18 +163,8 @@ describe 'oslo::cache' do
{ :pylibmc_package_name => 'python3-pylibmc',
:python_memcache_package_name => 'python3-memcache' }
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :pylibmc_package_name => 'python3-pylibmc',
:python_memcache_package_name => 'python3-memcached' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :pylibmc_package_name => 'python3-pylibmc',
:python_memcache_package_name => 'python3-memcached' }
else
{ :pylibmc_package_name => 'python-pylibmc',
:python_memcache_package_name => 'python-memcached' }
end
end
{ :pylibmc_package_name => 'python3-pylibmc',
:python_memcache_package_name => 'python3-memcached' }
end
end

18
spec/defines/oslo_coordination_spec.rb

@ -103,21 +103,9 @@ describe 'oslo::coordination' do
:python_etcd3gw_package_name => 'python3-etcd3gw',
:python_pymemcache_package_name => 'python3-pymemcache' }
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :python_redis_package_name => 'python3-redis',
:python_etcd3gw_package_name => 'python3-etcd3gw',
:python_pymemcache_package_name => 'python3-pymemcache' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :python_redis_package_name => 'python3-redis',
:python_etcd3gw_package_name => 'python3-etcd3gw',
:python_pymemcache_package_name => 'python3-pymemcache' }
else
{ :python_redis_package_name => 'python-redis',
:python_etcd3gw_package_name => 'python-etcd3gw',
:python_pymemcache_package_name => 'python-pymemcache' }
end
end
{ :python_redis_package_name => 'python3-redis',
:python_etcd3gw_package_name => 'python3-etcd3gw',
:python_pymemcache_package_name => 'python3-pymemcache' }
end
end

26
spec/defines/oslo_db_spec.rb

@ -248,27 +248,11 @@ describe 'oslo::db' do
:pysqlite2_package_name => 'python3-pysqlite2',
}
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{
:pymongo_package_name => 'python3-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
else
if facts[:operatingsystemmajrelease] > '7'
{
:pymongo_package_name => 'python3-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
else
{
:pymongo_package_name => 'python-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
end
end
{
:pymongo_package_name => 'python3-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
end
end

Loading…
Cancel
Save