Debian is using python3-barbicanclient

Change-Id: I97ef57eb9d77e2773d6e805fc6e3ad623925d51a
This commit is contained in:
zhubingbing 2018-04-12 10:30:34 +08:00
parent caff16c691
commit bfbb8e8a86
2 changed files with 21 additions and 1 deletions

View File

@ -5,7 +5,13 @@
class barbican::params {
include ::openstacklib::defaults
$client_package_name = 'python-barbicanclient'
if ($::os_package_type == 'debian') {
$pyvers = '3'
} else {
$pyvers = ''
}
$client_package_name = "python${pyvers}-barbicanclient"
$group = 'barbican'
$dogtag_client_package = 'pki-base'

View File

@ -25,6 +25,7 @@ describe 'barbican::client' do
describe "with default parameters" do
it { is_expected.to contain_package('python-barbicanclient').with(
'ensure' => 'present',
'name' => platform_params[:client_package_name],
'tag' => 'openstack'
)}
it { is_expected.to contain_package('python-openstackclient').with(
@ -55,6 +56,19 @@ describe 'barbican::client' do
}))
end
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-barbicanclient' }
else
{ :client_package_name => 'python-barbicanclient' }
end
when 'RedHat'
{ :client_package_name => 'python-barbicanclient' }
end
end
it_configures 'barbican client'
end
end