Include authtoken configuration for api
Ie6a6003d667c8c6045439ca3d35f0f121097bddc removed the inclusion of ::mistral::keystone::authtoken in the ::mistral class. This change adds it to the api configuration which matches what we have for other modules. Additionally this change add auth_strategy to the api class to allow users to be able to disable it if they don't want to configuration keystone. Change-Id: I68037d0a1f8f43ca40ef6faff119c3fb4b535a90 Closes-Bug: #1777541
This commit is contained in:
parent
326ea12559
commit
b8612ad8d3
|
@ -50,6 +50,10 @@
|
|||
# HTTPProxyToWSGI middleware.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*auth_strategy*]
|
||||
# (optional) Type of authentication to be used.
|
||||
# Defaults to 'keystone'
|
||||
#
|
||||
class mistral::api (
|
||||
$allow_action_execution_deletion = $::os_service_default,
|
||||
$api_workers = $::os_workers,
|
||||
|
@ -60,12 +64,17 @@ class mistral::api (
|
|||
$package_ensure = present,
|
||||
$service_name = $::mistral::params::api_service_name,
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
$auth_strategy = 'keystone',
|
||||
) inherits mistral::params {
|
||||
|
||||
include ::mistral::deps
|
||||
include ::mistral::params
|
||||
include ::mistral::policy
|
||||
|
||||
if $auth_strategy == 'keystone' {
|
||||
include ::mistral::keystone::authtoken
|
||||
}
|
||||
|
||||
package { 'mistral-api':
|
||||
ensure => $package_ensure,
|
||||
name => $::mistral::params::api_package_name,
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Added `auth_strategy` to ::mistral::api to configure the inclusion of
|
||||
::mistral::keystone::authtoken during the api configuration. Set this to
|
||||
something other than 'keystone' to have ::mistral::api not include the
|
||||
authtoken configuration.
|
|
@ -24,6 +24,7 @@ describe 'mistral::api' do
|
|||
|
||||
it { is_expected.to contain_class('mistral::params') }
|
||||
it { is_expected.to contain_class('mistral::policy') }
|
||||
it { is_expected.to contain_class('mistral::keystone::authtoken') }
|
||||
|
||||
it { is_expected.to contain_mistral_config('api/api_workers').with_value( params[:api_workers] ) }
|
||||
it { is_expected.to contain_mistral_config('api/host').with_value( params[:bind_host] ) }
|
||||
|
@ -95,7 +96,10 @@ describe 'mistral::api' do
|
|||
let :pre_condition do
|
||||
"include ::apache
|
||||
include ::mistral::db
|
||||
class { '::mistral': }"
|
||||
class { '::mistral': }
|
||||
class { '::mistral::keystone::authtoken':
|
||||
password => 'foo',
|
||||
}"
|
||||
end
|
||||
|
||||
it 'configures mistral-api service with Apache' do
|
||||
|
|
Loading…
Reference in New Issue