From efb5884150d07e2304e2d7956132a80159676e44 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 17 Jan 2019 21:45:31 +0100 Subject: [PATCH] Inherit pyvers from openstacklib::defaults Change-Id: I2661617530ea627ad02fed24953852b295ecbb7a --- manifests/params.pp | 9 ++------- spec/classes/octavia_client_spec.rb | 6 +----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index b33cfbb3..1d875694 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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' diff --git a/spec/classes/octavia_client_spec.rb b/spec/classes/octavia_client_spec.rb index 2cad7777..862d29c3 100644 --- a/spec/classes/octavia_client_spec.rb +++ b/spec/classes/octavia_client_spec.rb @@ -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