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: Ia0d3a1083a6896685714e51266c250257d0ad0cf
changes/52/792552/1 19.0.0
Thomas Goirand 4 months ago
parent
commit
1bee3966c7
  1. 5
      manifests/params.pp
  2. 30
      spec/classes/horizon_init_spec.rb

5
manifests/params.pp

@ -2,7 +2,6 @@
# should be considered to be constant
class horizon::params {
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$logdir = '/var/log/horizon'
$django_wsgi = '/usr/share/openstack-dashboard/openstack_dashboard/wsgi.py'
@ -23,7 +22,7 @@ class horizon::params {
$apache_group = 'apache'
$wsgi_user = 'apache'
$wsgi_group = 'apache'
$memcache_package = "python${pyvers}-memcached"
$memcache_package = 'python3-memcached'
}
'Debian': {
$http_service = 'apache2'
@ -35,7 +34,7 @@ class horizon::params {
$apache_group = 'www-data'
$wsgi_user = 'horizon'
$wsgi_group = 'horizon'
$memcache_package = "python${pyvers}-memcache"
$memcache_package = 'python3-memcache'
case $::os_package_type {
'debian': {
$package_name = 'openstack-dashboard-apache'

30
spec/classes/horizon_init_spec.rb

@ -781,30 +781,12 @@ describe 'horizon' do
}
end
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :config_file => '/etc/openstack-dashboard/local_settings',
:package_name => 'openstack-dashboard',
:root_url => '/dashboard',
:root_path => '/usr/share/openstack-dashboard',
:memcache_package => 'python3-memcached',
}
else
if facts[:operatingsystemmajrelease] > '7'
{ :config_file => '/etc/openstack-dashboard/local_settings',
:package_name => 'openstack-dashboard',
:root_url => '/dashboard',
:root_path => '/usr/share/openstack-dashboard',
:memcache_package => 'python3-memcached',
}
else
{ :config_file => '/etc/openstack-dashboard/local_settings',
:package_name => 'openstack-dashboard',
:root_url => '/dashboard',
:root_path => '/usr/share/openstack-dashboard',
:memcache_package => 'python-memcached',
}
end
end
{ :config_file => '/etc/openstack-dashboard/local_settings',
:package_name => 'openstack-dashboard',
:root_url => '/dashboard',
:root_path => '/usr/share/openstack-dashboard',
:memcache_package => 'python3-memcached',
}
end
end

Loading…
Cancel
Save