From 4856ae2868f2e0a0dd28001c50d5527becebc516 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 17 Jan 2019 22:06:38 +0100 Subject: [PATCH] Inherit pyvers from openstacklib::defaults Change-Id: Id839d55945a76ff033925f3e5357bed97767290a --- manifests/params.pp | 8 +------- spec/classes/trove_client_spec.rb | 6 +----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 00a7d5d0..9d9593bf 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,13 +4,7 @@ # class trove::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 $client_package_name = "python${pyvers}-troveclient" $group = 'trove' diff --git a/spec/classes/trove_client_spec.rb b/spec/classes/trove_client_spec.rb index 814d523f..c7b94c19 100644 --- a/spec/classes/trove_client_spec.rb +++ b/spec/classes/trove_client_spec.rb @@ -54,11 +54,7 @@ describe 'trove::client' do let(:platform_params) do case facts[:osfamily] when 'Debian' - if facts[:os_package_type] == 'debian' - { :client_package_name => 'python3-troveclient' } - else - { :client_package_name => 'python-troveclient' } - end + { :client_package_name => 'python3-troveclient' } when 'RedHat' { :client_package_name => 'python-troveclient' } end