Fix magnum cluster TLS cert generation

Magnum cluster's cert creation requires admin_user, admin_password
and admin_tenant_name to be set in [keystone_authtoken] section.

Change-Id: Ice8e6537ac6796df032c4c4cf2a194d2214430fd
Closes-Bug: #1670355
This commit is contained in:
yatin 2017-08-30 12:11:23 +05:30 committed by Mohammed Naser
parent cc7461f999
commit b7071d406c
2 changed files with 12 additions and 0 deletions

View File

@ -256,4 +256,10 @@ class magnum::keystone::authtoken(
signing_dir => $signing_dir, signing_dir => $signing_dir,
token_cache_time => $token_cache_time, token_cache_time => $token_cache_time,
} }
magnum_config {
'keystone_authtoken/admin_tenant_name': value => $project_name;
'keystone_authtoken/admin_user' : value => $username;
'keystone_authtoken/admin_password' : value => $password, secret => true;
}
} }

View File

@ -19,6 +19,9 @@ describe 'magnum::keystone::authtoken' do
is_expected.to contain_magnum_config('keystone_authtoken/password').with_value('magnum_password') is_expected.to contain_magnum_config('keystone_authtoken/password').with_value('magnum_password')
is_expected.to contain_magnum_config('keystone_authtoken/auth_url').with_value('http://localhost:35357') is_expected.to contain_magnum_config('keystone_authtoken/auth_url').with_value('http://localhost:35357')
is_expected.to contain_magnum_config('keystone_authtoken/project_name').with_value('services') is_expected.to contain_magnum_config('keystone_authtoken/project_name').with_value('services')
is_expected.to contain_magnum_config('keystone_authtoken/admin_user').with_value('magnum')
is_expected.to contain_magnum_config('keystone_authtoken/admin_password').with_value('magnum_password')
is_expected.to contain_magnum_config('keystone_authtoken/admin_tenant_name').with_value('services')
is_expected.to contain_magnum_config('keystone_authtoken/user_domain_name').with_value('<SERVICE DEFAULT>') is_expected.to contain_magnum_config('keystone_authtoken/user_domain_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_magnum_config('keystone_authtoken/project_domain_name').with_value('<SERVICE DEFAULT>') is_expected.to contain_magnum_config('keystone_authtoken/project_domain_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_magnum_config('keystone_authtoken/insecure').with_value('<SERVICE DEFAULT>') is_expected.to contain_magnum_config('keystone_authtoken/insecure').with_value('<SERVICE DEFAULT>')
@ -100,6 +103,9 @@ describe 'magnum::keystone::authtoken' do
is_expected.to contain_magnum_config('keystone_authtoken/password').with_value(params[:password]).with_secret(true) is_expected.to contain_magnum_config('keystone_authtoken/password').with_value(params[:password]).with_secret(true)
is_expected.to contain_magnum_config('keystone_authtoken/auth_url').with_value(params[:auth_url]) is_expected.to contain_magnum_config('keystone_authtoken/auth_url').with_value(params[:auth_url])
is_expected.to contain_magnum_config('keystone_authtoken/project_name').with_value(params[:project_name]) is_expected.to contain_magnum_config('keystone_authtoken/project_name').with_value(params[:project_name])
is_expected.to contain_magnum_config('keystone_authtoken/admin_user').with_value(params[:username])
is_expected.to contain_magnum_config('keystone_authtoken/admin_password').with_value(params[:password]).with_secret(true)
is_expected.to contain_magnum_config('keystone_authtoken/admin_tenant_name').with_value(params[:project_name])
is_expected.to contain_magnum_config('keystone_authtoken/user_domain_name').with_value(params[:user_domain_name]) is_expected.to contain_magnum_config('keystone_authtoken/user_domain_name').with_value(params[:user_domain_name])
is_expected.to contain_magnum_config('keystone_authtoken/project_domain_name').with_value(params[:project_domain_name]) is_expected.to contain_magnum_config('keystone_authtoken/project_domain_name').with_value(params[:project_domain_name])
is_expected.to contain_magnum_config('keystone_authtoken/insecure').with_value(params[:insecure]) is_expected.to contain_magnum_config('keystone_authtoken/insecure').with_value(params[:insecure])