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: Ib369975e3c852919765deebd09a5fa74dd78808a
changes/73/792573/1
Thomas Goirand 2 months ago
parent
commit
517c3d6fe7
  1. 14
      manifests/params.pp
  2. 10
      spec/classes/placement_client_spec.rb
  3. 22
      spec/classes/placement_init_spec.rb

14
manifests/params.pp

@ -5,12 +5,6 @@ class placement::params {
include placement::deps
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$pyvers_real = $pyvers ? {
'' => '2',
default => $pyvers
}
$group = 'placement'
case $::osfamily {
@ -18,8 +12,8 @@ class placement::params {
# package names
$package_name = 'openstack-placement-api'
$common_package_name = 'openstack-placement-common'
$python_package_name = "python${pyvers_real}-placement"
$osc_package_name = "python${pyvers_real}-osc-placement"
$python_package_name = 'python3-placement'
$osc_package_name = 'python3-osc-placement'
$service_name = false
$public_url = 'http://127.0.0.1/placement'
$internal_url = 'http://127.0.0.1/placement'
@ -31,8 +25,8 @@ class placement::params {
'Debian': {
$package_name = 'placement-api'
$common_package_name = 'placement-common'
$python_package_name = "python${pyvers_real}-placement"
$osc_package_name = "python${pyvers_real}-osc-placement"
$python_package_name = 'python3-placement'
$osc_package_name = 'python3-osc-placement'
case $::os_package_type {
'debian': {
$service_name = 'placement-api'

10
spec/classes/placement_client_spec.rb

@ -31,15 +31,7 @@ describe 'placement::client' do
when 'Debian'
{ :client_package_name => 'python3-osc-placement' }
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :client_package_name => 'python3-osc-placement' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :client_package_name => 'python3-osc-placement' }
else
{ :client_package_name => 'python2-osc-placement' }
end
end
{ :client_package_name => 'python3-osc-placement' }
end
end

22
spec/classes/placement_init_spec.rb

@ -76,24 +76,10 @@ describe 'placement' do
:common_package_name => 'placement-common',
}
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{
:python_package_name => 'python3-placement',
:common_package_name => 'openstack-placement-common',
}
else
if facts[:operatingsystemmajrelease] > '7'
{
:python_package_name => 'python3-placement',
:common_package_name => 'openstack-placement-common',
}
else
{
:python_package_name => 'python2-placement',
:common_package_name => 'openstack-placement-common',
}
end
end
{
:python_package_name => 'python3-placement',
:common_package_name => 'openstack-placement-common',
}
end
end

Loading…
Cancel
Save