Inherit pyvers from openstacklib::defaults

Change-Id: I2661617530ea627ad02fed24953852b295ecbb7a
This commit is contained in:
Tobias Urdin 2019-01-17 21:45:31 +01:00
parent a48d9b3076
commit efb5884150
2 changed files with 3 additions and 12 deletions

View File

@ -2,13 +2,7 @@
#
class octavia::params {
include ::openstacklib::defaults
if ($::os_package_type == 'debian') or ($::os['name'] == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
$pyvers = '3'
} else {
$pyvers = ''
}
$pyvers = $::openstacklib::defaults::pyvers
$api_service_name = 'octavia-api'
$worker_service_name = 'octavia-worker'
@ -16,6 +10,7 @@ class octavia::params {
$housekeeping_service_name = 'octavia-housekeeping'
$client_package_name = "python${pyvers}-octaviaclient"
$group = 'octavia'
case $::osfamily {
'RedHat': {
$common_package_name = 'openstack-octavia-common'

View File

@ -38,11 +38,7 @@ describe 'octavia::client' do
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-octaviaclient' }
else
{ :client_package_name => 'python-octaviaclient' }
end
{ :client_package_name => 'python3-octaviaclient' }
when 'RedHat'
{ :client_package_name => 'python-octaviaclient' }
end