diff --git a/manifests/api.pp b/manifests/api.pp index fab5f3df..c979f616 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -68,6 +68,10 @@ # (optional) Configure the loadbalancer provider drivers. # Defaults to $::os_service_default # +# [*pagination_max_limit*] +# (optional) The maximum number of items returned in a single response. +# Defaults to $::os_service_default +# # DEPRECATED PARAMETERS # # [*ovn_nb_connection*] @@ -90,6 +94,7 @@ class octavia::api ( $enable_proxy_headers_parsing = $::os_service_default, $default_provider_driver = $::os_service_default, $provider_drivers = $::os_service_default, + $pagination_max_limit = $::os_service_default, # DEPRECATED PARAMETERS $ovn_nb_connection = undef ) inherits octavia::params { @@ -155,6 +160,7 @@ class octavia::api ( 'api_settings/allow_tls_terminated_listeners': value => $allow_tls_terminated_listeners; 'api_settings/default_provider_driver': value => $default_provider_driver; 'api_settings/enabled_provider_drivers': value => $provider_drivers; + 'api_settings/pagination_max_limit': value => $pagination_max_limit; } oslo::middleware { 'octavia_config': diff --git a/releasenotes/notes/octaiva-api-pagination_max_limit-d179a43fa2234930.yaml b/releasenotes/notes/octaiva-api-pagination_max_limit-d179a43fa2234930.yaml new file mode 100644 index 00000000..eb53d9bb --- /dev/null +++ b/releasenotes/notes/octaiva-api-pagination_max_limit-d179a43fa2234930.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``octaiva::api::pagination_max_limit`` parameter has been + added to configure the pagination_max_limit parameter in octavia. diff --git a/spec/classes/octavia_api_spec.rb b/spec/classes/octavia_api_spec.rb index 4ecf7619..4b761f88 100644 --- a/spec/classes/octavia_api_spec.rb +++ b/spec/classes/octavia_api_spec.rb @@ -13,6 +13,7 @@ describe 'octavia::api' do :allow_tls_terminated_listeners => false, :default_provider_driver => 'ovn', :provider_drivers => { 'amphora' => 'Octavia Amphora Driver', 'ovn' => 'Octavia OVN driver' }, + :pagination_max_limit => '1000', } end @@ -53,6 +54,7 @@ describe 'octavia::api' do is_expected.to contain_octavia_config('api_settings/allow_tls_terminated_listeners').with_value('') is_expected.to contain_octavia_config('api_settings/default_provider_driver').with_value('') is_expected.to contain_octavia_config('api_settings/enabled_provider_drivers').with_value('') + is_expected.to contain_octavia_config('api_settings/pagination_max_limit').with_value('') is_expected.to contain_oslo__middleware('octavia_config').with( :enable_proxy_headers_parsing => '', ) @@ -71,6 +73,7 @@ describe 'octavia::api' do is_expected.to contain_octavia_config('api_settings/allow_tls_terminated_listeners').with_value( params[:allow_tls_terminated_listeners] ) is_expected.to contain_octavia_config('api_settings/default_provider_driver').with_value( params[:default_provider_driver] ) is_expected.to contain_octavia_config('api_settings/enabled_provider_drivers').with_value( params[:provider_drivers] ) + is_expected.to contain_octavia_config('api_settings/pagination_max_limit').with_value( params[:pagination_max_limit] ) end [{:enabled => true}, {:enabled => false}].each do |param_hash|