Browse Source

Merge "Get rid of the $pyvers variable"

master
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
22b0b806bb
3 changed files with 9 additions and 37 deletions
  1. +4
    -10
      manifests/params.pp
  2. +1
    -9
      spec/classes/placement_client_spec.rb
  3. +4
    -18
      spec/classes/placement_init_spec.rb

+ 4
- 10
manifests/params.pp View File

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


+ 1
- 9
spec/classes/placement_client_spec.rb View File

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


+ 4
- 18
spec/classes/placement_init_spec.rb View File

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