Merge "api: Remove redundant hard-coded defaults"

This commit is contained in:
Zuul 2023-03-17 09:14:04 +00:00 committed by Gerrit Code Review
commit ba48629c4b
2 changed files with 6 additions and 9 deletions

View File

@ -78,9 +78,9 @@ class ironic::api (
$manage_service = true,
$enabled = true,
$service_name = $::ironic::params::api_service,
$host_ip = '0.0.0.0',
$port = '6385',
$max_limit = '1000',
$host_ip = $facts['os_service_default'],
$port = $facts['os_service_default'],
$max_limit = $facts['os_service_default'],
$workers = $facts['os_service_default'],
$public_endpoint = $facts['os_service_default'],
$enable_proxy_headers_parsing = $facts['os_service_default'],

View File

@ -30,9 +30,6 @@ describe 'ironic::api' do
let :params do
{ :package_ensure => 'present',
:enabled => true,
:port => '6385',
:max_limit => '1000',
:host_ip => '0.0.0.0',
}
end
@ -64,9 +61,9 @@ describe 'ironic::api' do
end
it 'configures ironic.conf' do
is_expected.to contain_ironic_config('api/port').with_value(p[:port])
is_expected.to contain_ironic_config('api/host_ip').with_value(p[:host_ip])
is_expected.to contain_ironic_config('api/max_limit').with_value(p[:max_limit])
is_expected.to contain_ironic_config('api/port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('api/host_ip').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('api/max_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('api/api_workers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('api/public_endpoint').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__middleware('ironic_config').with(