Merge "Add support for [DEFAULT] list_limit"

This commit is contained in:
Zuul 2024-09-11 23:38:31 +00:00 committed by Gerrit Code Review
commit ceb588dc0d
3 changed files with 18 additions and 4 deletions

View File

@ -216,6 +216,11 @@
# (Optional) maximum allowable Keystone token size
# Defaults to $facts['os_service_default']
#
# [*list_limit*]
# (Optional) The maximum number of entities that will be returned in
# a collection.
# Defaults to $facts['os_service_default']
#
# [*sync_db*]
# (Optional) Run db sync on the node.
# Defaults to true
@ -399,6 +404,7 @@ class keystone(
$rpc_response_timeout = $facts['os_service_default'],
$service_name = $::keystone::params::service_name,
$max_token_size = $facts['os_service_default'],
$list_limit = $facts['os_service_default'],
Boolean $sync_db = true,
Boolean $enable_fernet_setup = true,
Stdlib::Absolutepath $fernet_key_repository = '/etc/keystone/fernet-keys',
@ -472,6 +478,7 @@ class keystone(
}
keystone_config {
'token/provider': value => $token_provider;
'token/expiration': value => $token_expiration;
}
@ -500,8 +507,8 @@ class keystone(
}
keystone_config {
'token/provider': value => $token_provider;
'DEFAULT/max_token_size': value => $max_token_size;
'DEFAULT/list_limit': value => $list_limit;
}
keystone_config {

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``keystone::list_limit`` parameter has been added.

View File

@ -32,6 +32,7 @@ describe 'keystone' do
it 'should set the default values' do
is_expected.to contain_resources('keystone_config').with({ :purge => false })
is_expected.to contain_keystone_config('DEFAULT/public_endpoint').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('token/provider').with_value('fernet')
is_expected.to contain_keystone_config('token/expiration').with_value(3600)
is_expected.to contain_keystone_config('identity/password_hash_algorithm').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('identity/password_hash_rounds').with_value('<SERVICE DEFAULT>')
@ -47,8 +48,8 @@ describe 'keystone' do
is_expected.to contain_keystone_config('catalog/driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('catalog/template_file').with_value('/etc/keystone/default_catalog.templates')
is_expected.to contain_keystone_config('token/provider').with_value('fernet')
is_expected.to contain_keystone_config('DEFAULT/max_token_size').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/list_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/notification_format').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/notification_opt_out').with_value('<SERVICE DEFAULT>')
@ -140,6 +141,7 @@ describe 'keystone' do
{
:purge_config => true,
:public_endpoint => 'http://127.0.0.1:5000',
:token_provider => 'uuid',
:token_expiration => 7200,
:password_hash_algorithm => 'bcrypt',
:password_hash_rounds => 12,
@ -151,8 +153,8 @@ describe 'keystone' do
:max_request_body_size => 114688,
:catalog_driver => 'templated',
:catalog_template_file => '/some/template_file',
:token_provider => 'uuid',
:max_token_size => 255,
:list_limit => 10000,
:notification_format => 'basic',
:notification_opt_out => [
'identity.authenticate.success',
@ -165,6 +167,7 @@ describe 'keystone' do
it 'should set the overridden values' do
is_expected.to contain_resources('keystone_config').with({ :purge => true })
is_expected.to contain_keystone_config('DEFAULT/public_endpoint').with_value('http://127.0.0.1:5000')
is_expected.to contain_keystone_config('token/provider').with_value('uuid')
is_expected.to contain_keystone_config('token/expiration').with_value(7200)
is_expected.to contain_keystone_config('identity/password_hash_algorithm').with_value('bcrypt')
is_expected.to contain_keystone_config('identity/password_hash_rounds').with_value(12)
@ -180,8 +183,8 @@ describe 'keystone' do
is_expected.to contain_keystone_config('catalog/driver').with_value('templated')
is_expected.to contain_keystone_config('catalog/template_file').with_value('/some/template_file')
is_expected.to contain_keystone_config('token/provider').with_value('uuid')
is_expected.to contain_keystone_config('DEFAULT/max_token_size').with_value(255)
is_expected.to contain_keystone_config('DEFAULT/list_limit').with_value(10000)
is_expected.to contain_keystone_config('DEFAULT/notification_format').with_value('basic')
is_expected.to contain_keystone_config('DEFAULT/notification_opt_out').with_value([
'identity.authenticate.success',