Browse Source

Merge "Remove redundant defaults in ironic::inspector::ironic"

changes/14/824114/1
Zuul 5 months ago committed by Gerrit Code Review
parent
commit
a29ec09d28
  1. 8
      manifests/inspector/ironic.pp
  2. 10
      spec/classes/ironic_inspector_ironic_spec.rb

8
manifests/inspector/ironic.pp

@ -51,11 +51,11 @@
#
# [*max_retries*]
# (optional) Maximum number of retries in case of conflict error
# Defaults to 30
# Defaults to $::os_service_default
#
# [*retry_interval*]
# (optional) Interval between retries in case of conflict error
# Defaults to 2
# Defaults to $::os_service_default
#
class ironic::inspector::ironic (
$auth_type = 'password',
@ -67,8 +67,8 @@ class ironic::inspector::ironic (
$project_domain_name = 'Default',
$region_name = $::os_service_default,
$endpoint_override = $::os_service_default,
$max_retries = 30,
$retry_interval = 2,
$max_retries = $::os_service_default,
$retry_interval = $::os_service_default,
) {
$auth_type_real = pick($::ironic::inspector::ironic_auth_type, $auth_type)

10
spec/classes/ironic_inspector_ironic_spec.rb

@ -22,8 +22,6 @@ describe 'ironic::inspector::ironic' do
:auth_url => 'http://127.0.0.1:5000/v3',
:project_name => 'services',
:username => 'ironic',
:max_retries => 30,
:retry_interval => 2,
}
end
@ -46,8 +44,8 @@ describe 'ironic::inspector::ironic' do
is_expected.to contain_ironic_inspector_config('ironic/project_domain_name').with_value('Default')
is_expected.to contain_ironic_inspector_config('ironic/region_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_inspector_config('ironic/endpoint_override').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_inspector_config('ironic/max_retries').with_value(p[:max_retries])
is_expected.to contain_ironic_inspector_config('ironic/retry_interval').with_value(p[:retry_interval])
is_expected.to contain_ironic_inspector_config('ironic/max_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_inspector_config('ironic/retry_interval').with_value('<SERVICE DEFAULT>')
end
context 'when overriding parameters' do
@ -62,8 +60,8 @@ describe 'ironic::inspector::ironic' do
:project_domain_name => 'NonDefault',
:region_name => 'regionTwo',
:endpoint_override => 'http://example2.com',
:max_retries => 60,
:retry_interval => 10,
:max_retries => 30,
:retry_interval => 2,
)
end

Loading…
Cancel
Save