Add support for [keystone_auth] auth_type

Change-Id: Ic631806cc4d4d930e4eeef9e77ff97aba443d7ee
This commit is contained in:
Takashi Kajinami 2022-01-10 22:30:00 +09:00
parent 5872700dbb
commit 470c51a633
3 changed files with 14 additions and 0 deletions

View File

@ -28,6 +28,10 @@
# (Optional) Name of domain for $project_name # (Optional) Name of domain for $project_name
# Defaults to 'Default' # Defaults to 'Default'
# #
# [*auth_type*]
# (Optional) Authentication type to load
# Defaults to 'password'
#
class magnum::keystone::keystone_auth( class magnum::keystone::keystone_auth(
$username = 'magnum', $username = 'magnum',
$password = $::os_service_default, $password = $::os_service_default,
@ -35,6 +39,7 @@ class magnum::keystone::keystone_auth(
$project_name = 'services', $project_name = 'services',
$user_domain_name = 'Default', $user_domain_name = 'Default',
$project_domain_name = 'Default', $project_domain_name = 'Default',
$auth_type = 'password',
) { ) {
include magnum::deps include magnum::deps
@ -49,6 +54,7 @@ class magnum::keystone::keystone_auth(
'keystone_auth/project_name' : value => $project_name; 'keystone_auth/project_name' : value => $project_name;
'keystone_auth/project_domain_name' : value => $project_domain_name; 'keystone_auth/project_domain_name' : value => $project_domain_name;
'keystone_auth/user_domain_name' : value => $user_domain_name; 'keystone_auth/user_domain_name' : value => $user_domain_name;
'keystone_auth/auth_type' : value => $auth_type;
} }
} }
} }

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``auth_type`` parameter has been added to
the ``magnum::keystone::keystone_auth`` class.

View File

@ -28,6 +28,7 @@ describe 'magnum::keystone::keystone_auth' do
is_expected.to contain_magnum_config('keystone_auth/project_name').with_value('services') is_expected.to contain_magnum_config('keystone_auth/project_name').with_value('services')
is_expected.to contain_magnum_config('keystone_auth/user_domain_name').with_value('Default') is_expected.to contain_magnum_config('keystone_auth/user_domain_name').with_value('Default')
is_expected.to contain_magnum_config('keystone_auth/project_domain_name').with_value('Default') is_expected.to contain_magnum_config('keystone_auth/project_domain_name').with_value('Default')
is_expected.to contain_magnum_config('keystone_auth/auth_type').with_value('password')
end end
end end
@ -41,6 +42,7 @@ describe 'magnum::keystone::keystone_auth' do
:project_name => 'service_project', :project_name => 'service_project',
:user_domain_name => 'domainX', :user_domain_name => 'domainX',
:project_domain_name => 'domainX', :project_domain_name => 'domainX',
:auth_type => 'v3password',
}) })
end end
@ -51,6 +53,7 @@ describe 'magnum::keystone::keystone_auth' do
is_expected.to contain_magnum_config('keystone_auth/project_name').with_value(params[:project_name]) is_expected.to contain_magnum_config('keystone_auth/project_name').with_value(params[:project_name])
is_expected.to contain_magnum_config('keystone_auth/user_domain_name').with_value(params[:user_domain_name]) is_expected.to contain_magnum_config('keystone_auth/user_domain_name').with_value(params[:user_domain_name])
is_expected.to contain_magnum_config('keystone_auth/project_domain_name').with_value(params[:project_domain_name]) is_expected.to contain_magnum_config('keystone_auth/project_domain_name').with_value(params[:project_domain_name])
is_expected.to contain_magnum_config('keystone_auth/auth_type').with_value(params[:auth_type])
end end
end end
end end