diff --git a/manifests/params.pp b/manifests/params.pp index e55f556..6afe002 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,7 +5,13 @@ class zaqar::params { include ::openstacklib::defaults - $client_package_name = 'python-zaqarclient' + if ($::os_package_type == 'debian') { + $pyvers = '3' + } else { + $pyvers = '' + } + + $client_package_name = "python${pyvers}-zaqarclient" $group = 'zaqar' case $::osfamily { diff --git a/spec/classes/zaqar_client_spec.rb b/spec/classes/zaqar_client_spec.rb index f294cb3..81b6779 100644 --- a/spec/classes/zaqar_client_spec.rb +++ b/spec/classes/zaqar_client_spec.rb @@ -24,8 +24,17 @@ describe 'zaqar::client' do facts.merge!(OSDefaults.get_facts()) end - let :platform_params do - { :client_package_name => 'python-zaqarclient' } + let(:platform_params) do + case facts[:osfamily] + when 'Debian' + if facts[:os_package_type] == 'debian' + { :client_package_name => 'python3-zaqarclient' } + else + { :client_package_name => 'python-zaqarclient' } + end + when 'RedHat' + { :client_package_name => 'python-zaqarclient' } + end end it_behaves_like 'zaqar client'