inspector: Add support for [DEFAULT] api_max_limit

Change-Id: I95f48c60e181e21bc56270d5840d2450b5ec5c76
This commit is contained in:
Takashi Kajinami 2021-10-30 10:41:17 +09:00
parent 889fc86298
commit fd7102cfba
3 changed files with 15 additions and 1 deletions

View File

@ -48,6 +48,10 @@
# set to 0 to disable.
# Defaults to $::os_service_default
#
# [*api_max_limit*]
# (optional) Limit the numer of elements an API list-call returns
# Defaults to $::os_service_default
#
# [*dnsmasq_interface*]
# (optional) The interface for the ironic-inspector dnsmasq process
# to listen on
@ -269,6 +273,7 @@ class ironic::inspector (
$dhcp_debug = false,
$auth_strategy = 'keystone',
$timeout = $::os_service_default,
$api_max_limit = $::os_service_default,
$dnsmasq_interface = 'br-ctlplane',
$ramdisk_logs_dir = '/var/log/ironic-inspector/ramdisk/',
$always_store_ramdisk_logs = $::os_service_default,
@ -416,6 +421,7 @@ Use ironic::inspector::ironic::endpoint_override instead.')
'DEFAULT/auth_strategy': value => $auth_strategy;
'DEFAULT/timeout': value => $timeout;
'DEFAULT/transport_url': value => $default_transport_url;
'DEFAULT/api_max_limit': value => $api_max_limit;
'capabilities/boot_mode': value => $detect_boot_mode;
'iptables/dnsmasq_interface': value => $dnsmasq_interface;
'processing/ramdisk_logs_dir': value => $ramdisk_logs_dir;

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``ironic::inspector::api_max_limit`` parameter has been added.

View File

@ -69,7 +69,8 @@ describe 'ironic::inspector' do
:ipxe_timeout => 0,
:http_port => 8088,
:tftp_root => '/tftpboot',
:http_root => '/httpboot', }
:http_root => '/httpboot',
}
end
@ -122,6 +123,7 @@ describe 'ironic::inspector' do
is_expected.to contain_ironic_inspector_config('DEFAULT/auth_strategy').with_value(p[:auth_strategy])
is_expected.to contain_ironic_inspector_config('DEFAULT/timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_inspector_config('DEFAULT/transport_url').with_value('fake://')
is_expected.to contain_ironic_inspector_config('DEFAULT/api_max_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_inspector_config('capabilities/boot_mode').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_inspector_config('iptables/dnsmasq_interface').with_value(p[:dnsmasq_interface])
is_expected.to contain_ironic_inspector_config('processing/ramdisk_logs_dir').with_value(p[:ramdisk_logs_dir])
@ -216,6 +218,7 @@ describe 'ironic::inspector' do
params.merge!(
:dhcp_debug => true,
:listen_address => '127.0.0.1',
:api_max_limit => 100,
:ironic_password => 'password',
:ironic_project_domain_name => 'Default',
:ironic_user_domain_name => 'Default',
@ -243,6 +246,7 @@ describe 'ironic::inspector' do
end
it 'should replace default parameter with new value' do
is_expected.to contain_ironic_inspector_config('DEFAULT/listen_address').with_value(p[:listen_address])
is_expected.to contain_ironic_inspector_config('DEFAULT/api_max_limit').with_value(100)
is_expected.to contain_ironic_inspector_config('capabilities/boot_mode').with_value(p[:detect_boot_mode])
is_expected.to contain_ironic_inspector_config('ironic/password').with_value(p[:ironic_password]).with_secret(true)
is_expected.to contain_ironic_inspector_config('ironic/project_domain_name').with_value(p[:ironic_project_domain_name])