diff --git a/manifests/params.pp b/manifests/params.pp index 417e7b4..ea85e65 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,13 +4,7 @@ # class mistral::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 = "python${pyvers}-mistralclient" $db_sync_command = 'mistral-db-manage --config-file=/etc/mistral/mistral.conf upgrade head' diff --git a/spec/classes/mistral_client_spec.rb b/spec/classes/mistral_client_spec.rb index 60e79a7..64896a4 100644 --- a/spec/classes/mistral_client_spec.rb +++ b/spec/classes/mistral_client_spec.rb @@ -27,11 +27,7 @@ describe 'mistral::client' do let(:platform_params) do case facts[:osfamily] when 'Debian' - if facts[:os_package_type] == 'debian' - { :client_package => 'python3-mistralclient' } - else - { :client_package => 'python-mistralclient' } - end + { :client_package => 'python3-mistralclient' } when 'RedHat' { :client_package => 'python-mistralclient' } end