Merge "Refactor os distro/version check in client ut"
This commit is contained in:
commit
60b6455598
@ -32,15 +32,20 @@ describe 'openstacklib::openstackclient' do
|
||||
end
|
||||
|
||||
let(:platform_params) do
|
||||
if facts[:osfamily] == 'Debian' or (facts[:os_package_type] == 'rpm' \
|
||||
and facts[:operatingsystemrelease].to_i > 7) then
|
||||
openstackclient_package_name = 'python3-openstackclient'
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :openstackclient_package_name => 'python3-openstackclient' }
|
||||
when 'RedHat'
|
||||
if facts[:operatingsystem] == 'Fedora'
|
||||
{ :openstackclient_package_name => 'python3-openstackclient' }
|
||||
else
|
||||
openstackclient_package_name = 'python-openstackclient'
|
||||
if facts[:operatingsystemmajrelease] > '7'
|
||||
{ :openstackclient_package_name => 'python3-openstackclient' }
|
||||
else
|
||||
{ :openstackclient_package_name => 'python-openstackclient' }
|
||||
end
|
||||
end
|
||||
end
|
||||
{
|
||||
:openstackclient_package_name => openstackclient_package_name
|
||||
}
|
||||
end
|
||||
|
||||
it_behaves_like 'openstacklib::openstackclient'
|
||||
|
Loading…
Reference in New Issue
Block a user