Merge "Add support for [DEFAULT] max_db_limit"

This commit is contained in:
Zuul 2025-01-05 22:19:09 +00:00 committed by Gerrit Code Review
commit 1fb790e2aa
3 changed files with 15 additions and 2 deletions

View File

@ -239,6 +239,10 @@
# a collection.
# Defaults to $facts['os_service_default']
#
# [*max_db_limit*]
# (Optional) Limit the maximum number of items in a single response.
# Defaults to $facts['os_service_default']
#
# [*sync_db*]
# (Optional) Run db sync on the node.
# Defaults to true
@ -416,6 +420,7 @@ class keystone(
$service_name = $::keystone::params::service_name,
$max_token_size = $facts['os_service_default'],
$list_limit = $facts['os_service_default'],
$max_db_limit = $facts['os_service_default'],
Boolean $sync_db = true,
Boolean $enable_fernet_setup = true,
Stdlib::Absolutepath $fernet_key_repository = '/etc/keystone/fernet-keys',
@ -510,8 +515,9 @@ class keystone(
}
keystone_config {
'DEFAULT/max_token_size': value => $max_token_size;
'DEFAULT/list_limit': value => $list_limit;
'DEFAULT/max_token_size': value => $max_token_size;
'DEFAULT/list_limit': value => $list_limit;
'DEFAULT/max_db_limit': value => $max_db_limit;
}
keystone_config {

View File

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

View File

@ -49,6 +49,7 @@ describe 'keystone' do
is_expected.to contain_keystone_config('catalog/driver').with_value('<SERVICE DEFAULT>')
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/max_db_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>')
@ -156,6 +157,7 @@ describe 'keystone' do
:catalog_driver => 'templated',
:max_token_size => 255,
:list_limit => 10000,
:max_db_limit => 10001,
:notification_format => 'basic',
:notification_opt_out => [
'identity.authenticate.success',
@ -185,6 +187,7 @@ describe 'keystone' do
is_expected.to contain_keystone_config('catalog/driver').with_value('templated')
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/max_db_limit').with_value(10001)
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',