keystone: use auth_type and not auth_plugin

auth_plugin is deprecated in favor of auth_type.

Change-Id: I6bd1442101d276f538f184a1e2a63360f06a93f8
This commit is contained in:
Emilien Macchi 2016-07-18 14:37:28 -04:00
parent ea5d9de2d9
commit 96d6a1d1ce
2 changed files with 10 additions and 1 deletions

View File

@ -237,6 +237,10 @@
# (optional) CA certificate file to use to verify connecting clients # (optional) CA certificate file to use to verify connecting clients
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*keystone_auth_type*]
# (optional) An authentication plugin to use with an OpenStack Identity server.
# Defaults to 'password'
#
class barbican::api ( class barbican::api (
$ensure_package = 'present', $ensure_package = 'present',
$client_package_ensure = 'present', $client_package_ensure = 'present',
@ -290,6 +294,7 @@ class barbican::api (
$cert_file = $::os_service_default, $cert_file = $::os_service_default,
$key_file = $::os_service_default, $key_file = $::os_service_default,
$service_name = 'barbican-api', $service_name = 'barbican-api',
$keystone_auth_type = 'password',
) inherits barbican::params { ) inherits barbican::params {
include ::barbican::db include ::barbican::db
@ -415,7 +420,7 @@ class barbican::api (
} }
barbican_config { barbican_config {
'keystone_authtoken/auth_plugin': value => 'password'; 'keystone_authtoken/auth_type': value => $keystone_auth_type;
'keystone_authtoken/auth_url': value => $auth_url; 'keystone_authtoken/auth_url': value => $auth_url;
'keystone_authtoken/project_name': value => $keystone_tenant; 'keystone_authtoken/project_name': value => $keystone_tenant;
'keystone_authtoken/username': value => $keystone_user; 'keystone_authtoken/username': value => $keystone_user;
@ -430,6 +435,7 @@ class barbican::api (
barbican_config { barbican_config {
'keystone_authtoken/auth_plugin': ensure => 'absent'; 'keystone_authtoken/auth_plugin': ensure => 'absent';
'keystone_authtoken/auth_type': ensure => 'absent';
'keystone_authtoken/auth_uri': ensure => 'absent'; 'keystone_authtoken/auth_uri': ensure => 'absent';
'keystone_authtoken/project_name': ensure => 'absent'; 'keystone_authtoken/project_name': ensure => 'absent';
'keystone_authtoken/username': ensure => 'absent'; 'keystone_authtoken/username': ensure => 'absent';

View File

@ -218,6 +218,7 @@ describe 'barbican::api' do
{ {
:auth_type => 'keystone', :auth_type => 'keystone',
:keystone_password => 'foobar', :keystone_password => 'foobar',
:keystone_auth_type => 'passwordv3',
} }
end end
@ -228,6 +229,8 @@ describe 'barbican::api' do
.with_value('http://localhost:35357') .with_value('http://localhost:35357')
is_expected.to contain_barbican_config('keystone_authtoken/project_name')\ is_expected.to contain_barbican_config('keystone_authtoken/project_name')\
.with_value('services') .with_value('services')
is_expected.to contain_barbican_config('keystone_authtoken/auth_type')\
.with_value('passwordv3')
end end
end end