Refactor os distro/version check in client ut
... so that we can easilty understand which distro and which version we expect python3 packages. Change-Id: I385a4a5b123519961791ef6d842ab84990ea00c9
This commit is contained in:
@@ -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'
|
||||
else
|
||||
openstackclient_package_name = 'python-openstackclient'
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :openstackclient_package_name => 'python3-openstackclient' }
|
||||
when 'RedHat'
|
||||
if facts[:operatingsystem] == 'Fedora'
|
||||
{ :openstackclient_package_name => 'python3-openstackclient' }
|
||||
else
|
||||
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'
|
||||
|
Reference in New Issue
Block a user