Add collect_timing param to authtoken

Ensure the `collect_timing` param is included within the
[keystone_authtoken] config section.

Co-Authored-By: Juan Antonio Osorio Robles <jaosorior@redhat.com>
Change-Id: I049d65727348ef73553f21adf18183383f28ca17
Closes-bug: 1775140
This commit is contained in:
Harry Rybacki
2018-06-06 09:45:22 -04:00
committed by Tobias Urdin
parent 6d54f6a047
commit 2a326b52ac
3 changed files with 14 additions and 0 deletions

View File

@@ -102,6 +102,10 @@
# boolean value.
# Defaults to $::os_service_default.
#
# [*collect_timing*]
# (Optional) If true, collect per-method timing information for each API call.
# Defaults to $::os_service_default.
#
# [*delay_auth_decision*]
# (Optional) Do not handle authorization requests within the middleware, but
# delegate the authorization decision to downstream WSGI components. Boolean value
@@ -231,6 +235,7 @@ define keystone::resource::authtoken(
$cafile = $::os_service_default,
$certfile = $::os_service_default,
$check_revocations_for_cached = $::os_service_default,
$collect_timing = $::os_service_default,
$delay_auth_decision = $::os_service_default,
$enforce_token_bind = $::os_service_default,
$hash_algorithms = $::os_service_default,
@@ -310,6 +315,7 @@ define keystone::resource::authtoken(
'keystone_authtoken/cafile' => {'value' => $cafile},
'keystone_authtoken/certfile' => {'value' => $certfile},
'keystone_authtoken/check_revocations_for_cached' => {'value' => $check_revocations_for_cached},
'keystone_authtoken/collect_timing' => {'value' => $collect_timing},
'keystone_authtoken/delay_auth_decision' => {'value' => $delay_auth_decision},
'keystone_authtoken/enforce_token_bind' => {'value' => $enforce_token_bind},
'keystone_authtoken/hash_algorithms' => {'value' => $hash_algorithms},

View File

@@ -0,0 +1,5 @@
---
features:
- |
The collect_timing parameter has been added to keystone::resource::authtoken
which will set this config option in the keystone_authtoken section.

View File

@@ -29,6 +29,7 @@ describe 'keystone::resource::authtoken' do
is_expected.to contain_keystone_config('keystone_authtoken/cafile').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('keystone_authtoken/certfile').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('keystone_authtoken/check_revocations_for_cached').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('keystone_authtoken/collect_timing').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('keystone_authtoken/delay_auth_decision').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('keystone_authtoken/enforce_token_bind').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('keystone_authtoken/hash_algorithms').with_value('<SERVICE DEFAULT>')
@@ -68,6 +69,7 @@ describe 'keystone::resource::authtoken' do
:cafile => 'cafile.pem',
:certfile => 'certfile.crt',
:check_revocations_for_cached => true,
:collect_timing => true,
:delay_auth_decision => true,
:enforce_token_bind => 'strict',
:hash_algorithms => 'sha1',
@@ -92,6 +94,7 @@ describe 'keystone::resource::authtoken' do
is_expected.to contain_keystone_config('keystone_authtoken/auth_version').with_value(params[:auth_version])
is_expected.to contain_keystone_config('keystone_authtoken/cache').with_value(params[:cache])
is_expected.to contain_keystone_config('keystone_authtoken/check_revocations_for_cached').with_value(params[:check_revocations_for_cached])
is_expected.to contain_keystone_config('keystone_authtoken/collect_timing').with_value(params[:collect_timing])
is_expected.to contain_keystone_config('keystone_authtoken/delay_auth_decision').with_value(params[:delay_auth_decision])
is_expected.to contain_keystone_config('keystone_authtoken/enforce_token_bind').with_value(params[:enforce_token_bind])
is_expected.to contain_keystone_config('keystone_authtoken/hash_algorithms').with_value(params[:hash_algorithms])