Fix keystone configuration.
This patch updates the mistral keystone_authtoken configuration to be inline with other OpenStack puppet modules. Specifically it adds a unique setting for identity_uri so that it can be set correctly rather than re-using auth_uri for both settings. Includes some new tests for these settings. Change-Id: I092516aa07f6dec4cb26e44182f125d27c8ff334
This commit is contained in:
parent
356ad5d948
commit
636104b0bb
@ -25,7 +25,12 @@
|
||||
# The rpc backend. Default 'qpid'
|
||||
#
|
||||
# [*auth_uri*]
|
||||
# Keystone url. Default 'http://localhost:5000/v2.0/'
|
||||
# Specifies the public Identity URI for Mistral to use.
|
||||
# Default 'http://localhost:5000/v2.0/'
|
||||
|
||||
# [*identity_uri*]
|
||||
# Specifies the admin Identity URI for Mistral to use.
|
||||
# Default 'http://localhost:35357/'
|
||||
#
|
||||
# [*admin_user*]
|
||||
# The user name from 'mistral::keystone::auth'. Default 'mistral'
|
||||
@ -73,6 +78,7 @@ class mistral(
|
||||
$qpid_tcp_nodelay = true,
|
||||
$rpc_backend = 'qpid',
|
||||
$auth_uri = 'http://localhost:5000/v2.0/',
|
||||
$identity_uri = 'http://localhost:35357/',
|
||||
$admin_user = 'mistral',
|
||||
$admin_tenant_name = 'services',
|
||||
$admin_password = 'password',
|
||||
@ -240,16 +246,14 @@ class mistral(
|
||||
name => 'mistral',
|
||||
}
|
||||
|
||||
$auth_uri_with_version = "${auth_uri}${auth_version}/"
|
||||
$database_connection = "mysql://mistral:${mistral_db_pass}@${mysql_vip}/mistral"
|
||||
mistral_config {
|
||||
'DEFAULT/log_dir' : value => $log_dir;
|
||||
'DEFAULT/rpc_backend' : value => $rpc_backend;
|
||||
'keystone_authtoken/auth_uri' : value =>
|
||||
$auth_uri_with_version;
|
||||
'keystone_authtoken/auth_uri' : value => $auth_uri;
|
||||
'keystone_authtoken/identity_uri' : value => $identity_uri;
|
||||
'keystone_authtoken/auth_version' : value => $auth_version;
|
||||
'keystone_authtoken/auth_protocol' : value => $auth_protocol;
|
||||
'keystone_authtoken/identity_uri' : value => $auth_uri;
|
||||
'keystone_authtoken/admin_user' : value => $admin_user;
|
||||
'keystone_authtoken/admin_password' : value => $admin_password;
|
||||
'keystone_authtoken/admin_tenant_name' : value => $admin_tenant_name;
|
||||
|
25
spec/classes/mistral_init_spec.rb
Normal file
25
spec/classes/mistral_init_spec.rb
Normal file
@ -0,0 +1,25 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'mistral' do
|
||||
|
||||
let :params do
|
||||
{
|
||||
:auth_uri => 'http://127.0.0.1:5000/',
|
||||
:identity_uri => 'http://127.0.0.1:35357/',
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples_for 'a mistral base installation' do
|
||||
|
||||
it { is_expected.to contain_class('mistral::params') }
|
||||
|
||||
it 'configures auth_uri' do
|
||||
is_expected.to contain_mistral_config('keystone_authtoken/auth_uri').with_value( params[:auth_uri] )
|
||||
end
|
||||
|
||||
it 'configures identity_uri' do
|
||||
is_expected.to contain_mistral_config('keystone_authtoken/identity_uri').with_value( params[:identity_uri] )
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user