Merge "Get rid of the $pyvers variable"

This commit is contained in:
Zuul 2021-06-09 18:01:40 +00:00 committed by Gerrit Code Review
commit 2b4b7560f5
2 changed files with 4 additions and 15 deletions

View File

@ -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")

View File

@ -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
end
end