From 08ce70ddcfb49dcfde6320feccc0e461aa5e6847 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 17 Jan 2019 22:02:16 +0100 Subject: [PATCH] Inherit pyvers from openstacklib::defaults Change-Id: Ifc933d59d3488c1391136c553c89d701828ce0d1 --- manifests/params.pp | 7 +------ spec/classes/sahara_client_spec.rb | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 723051c0..9561a3b9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,13 +4,8 @@ # class sahara::params { include ::openstacklib::defaults + $pyvers = $::openstacklib::defaults::pyvers - if $::os_package_type == 'debian' or $::os['name'] == 'Fedora' or - ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7){ - $pyvers = '3' - } else { - $pyvers = '' - } $client_package_name = "python${pyvers}-saharaclient" $group = 'sahara' diff --git a/spec/classes/sahara_client_spec.rb b/spec/classes/sahara_client_spec.rb index 2474c1a8..0bd6a5f6 100644 --- a/spec/classes/sahara_client_spec.rb +++ b/spec/classes/sahara_client_spec.rb @@ -40,11 +40,7 @@ describe 'sahara::client' do let(:platform_params) do case facts[:osfamily] when 'Debian' - if facts[:os_package_type] == 'debian' - { :client_package_name => 'python3-saharaclient' } - else - { :client_package_name => 'python-saharaclient' } - end + { :client_package_name => 'python3-saharaclient' } when 'RedHat' { :client_package_name => 'python-saharaclient' } end