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: I34ef3bef5bb5d97791801d07583b9682b5e729b7
changes/55/792555/2
Thomas Goirand 2 months ago
parent
commit
afa9387452
  1. 9
      manifests/params.pp
  2. 10
      spec/classes/magnum_client_spec.rb

9
manifests/params.pp

@ -5,9 +5,6 @@
class magnum::params {
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$pyver3 = $::openstacklib::defaults::pyver3
$group = 'magnum'
case $::osfamily {
'RedHat': {
@ -18,7 +15,7 @@ class magnum::params {
# service names
$api_service = 'openstack-magnum-api'
$conductor_service = 'openstack-magnum-conductor'
$client_package = "python${pyvers}-magnumclient"
$client_package = 'python3-magnumclient'
$wsgi_script_path = '/var/www/cgi-bin/magnum'
$wsgi_script_source = '/usr/bin/magnum-api-wsgi'
}
@ -30,9 +27,9 @@ class magnum::params {
# service names
$api_service = 'magnum-api'
$conductor_service = 'magnum-conductor'
$client_package = "python${pyvers}-magnumclient"
$client_package = 'python3-magnumclient'
$wsgi_script_path = '/usr/lib/cgi-bin/magnum'
$wsgi_script_source = "/usr/lib/python${pyver3}/dist-packages/magnum/api/app.wsgi"
$wsgi_script_source = '/usr/lib/python3/dist-packages/magnum/api/app.wsgi'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem")

10
spec/classes/magnum_client_spec.rb

@ -27,15 +27,7 @@ describe 'magnum::client' do
when 'Debian'
{ :client_package_name => 'python3-magnumclient' }
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :client_package_name => 'python3-magnumclient' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :client_package_name => 'python3-magnumclient' }
else
{ :client_package_name => 'python-magnumclient' }
end
end
{ :client_package_name => 'python3-magnumclient' }
end
end

Loading…
Cancel
Save