Remove redundant defaults in ironic::inspector::ironic
The following two parameters of the ironic::inspector::ironic class defines the actual service defaults. This change removes these redundant definitions and let the service default used directly. - retry_interval - max_retries Change-Id: I84390ee35563bffa7ea1d896cc7a49806e4b6c3b
This commit is contained in:
parent
ea108af06b
commit
3efbc7533f
@ -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)
|
||||
|
@ -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…
x
Reference in New Issue
Block a user