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: Iddf30d802758324334cb3d941e2ed8b6a2979695
changes/85/792585/2
Thomas Goirand 2 months ago
parent
commit
5b0745101a
  1. 9
      manifests/params.pp
  2. 10
      spec/classes/swift_client_spec.rb
  3. 10
      spec/classes/swift_proxy_ceilometer_spec.rb
  4. 10
      spec/classes/swift_proxy_cname_lookup_spec.rb

9
manifests/params.pp

@ -4,10 +4,9 @@
#
class swift::params {
include openstacklib::defaults
$pyvers = $::openstacklib::defaults::pyvers
$client_package = "python${pyvers}-swiftclient"
$dnspython_pakage_name = "python${pyvers}-dnspython"
$client_package = 'python3-swiftclient'
$dnspython_pakage_name = 'python3-dnspython'
$service_provider = undef
case $::osfamily {
@ -35,7 +34,7 @@ class swift::params {
$account_auditor_service_name = 'swift-account-auditor'
$account_reaper_service_name = 'swift-account-reaper'
$account_replicator_service_name = 'swift-account-replicator'
$ceilometermiddleware_package_name = "python${pyvers}-ceilometermiddleware"
$ceilometermiddleware_package_name = 'python3-ceilometermiddleware'
}
'RedHat': {
$package_name = 'openstack-swift'
@ -61,7 +60,7 @@ class swift::params {
$account_auditor_service_name = 'openstack-swift-account-auditor'
$account_reaper_service_name = 'openstack-swift-account-reaper'
$account_replicator_service_name = 'openstack-swift-account-replicator'
$ceilometermiddleware_package_name = "python${pyvers}-ceilometermiddleware"
$ceilometermiddleware_package_name = 'python3-ceilometermiddleware'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \

10
spec/classes/swift_client_spec.rb

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

10
spec/classes/swift_proxy_ceilometer_spec.rb

@ -121,15 +121,7 @@ describe 'swift::proxy::ceilometer' do
when 'Debian'
{ :ceilometermiddleware_package_name => 'python3-ceilometermiddleware' }
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :ceilometermiddleware_package_name => 'python3-ceilometermiddleware' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :ceilometermiddleware_package_name => 'python3-ceilometermiddleware' }
else
{ :ceilometermiddleware_package_name => 'python-ceilometermiddleware' }
end
end
{ :ceilometermiddleware_package_name => 'python3-ceilometermiddleware' }
end
end

10
spec/classes/swift_proxy_cname_lookup_spec.rb

@ -56,15 +56,7 @@ describe 'swift::proxy::cname_lookup' do
when 'Debian'
{ :dnspython_package_name => 'python3-dnspython' }
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :dnspython_package_name => 'python3-dnspython' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :dnspython_package_name => 'python3-dnspython' }
else
{ :dnspython_package_name => 'python-dnspython' }
end
end
{ :dnspython_package_name => 'python3-dnspython' }
end
end

Loading…
Cancel
Save