Debian is using python3-gnocchiclient

Change-Id: I3aa785eaf30187df6a2dbb7ca0087ef695c48f18
This commit is contained in:
zhubingbing 2018-04-12 11:05:54 +08:00
parent e3b7c250a8
commit 396d6307f0
2 changed files with 21 additions and 2 deletions

View File

@ -5,7 +5,13 @@
class gnocchi::params {
include ::openstacklib::defaults
$client_package_name = 'python-gnocchiclient'
if ($::os_package_type == 'debian') {
$pyvers = '3'
} else {
$pyvers = ''
}
$client_package_name = "python${pyvers}-gnocchiclient"
$rados_package_name = 'python-rados'
$common_package_name = 'gnocchi-common'
$api_service_name = 'gnocchi-api'

View File

@ -10,7 +10,7 @@ describe 'gnocchi::client' do
it 'installs gnocchi client package' do
is_expected.to contain_package('python-gnocchiclient').with(
:ensure => 'present',
:name => 'python-gnocchiclient',
:name => platform_params[:client_package_name],
:tag => 'openstack',
)
end
@ -24,6 +24,19 @@ describe 'gnocchi::client' do
facts.merge!(OSDefaults.get_facts())
end
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-gnocchiclient' }
else
{ :client_package_name => 'python-gnocchiclient' }
end
when 'RedHat'
{ :client_package_name => 'python-gnocchiclient' }
end
end
it_behaves_like 'gnocchi client'
end
end