Add support for http_retries

The new http_retries option was added into neutron to define number of
retries in client connections.
This patch adds support for that new option.

Depends-on: https://review.opendev.org/#/c/736026/
Change-Id: Ifd7978c2404c6dd662d5e228bd7872cdfe00f4f4
This commit is contained in:
Takashi Kajinami 2020-07-10 11:17:47 +09:00
parent de2be7503c
commit 1389140f17
3 changed files with 15 additions and 1 deletions

View File

@ -70,6 +70,10 @@
# the keystone catalog.
# Defaults to $::os_service_default
#
# [*http_retries*]
# (optional) Number of novaclient/ironicclient retries on failed http calls.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*tenant_id*]
@ -102,6 +106,7 @@ class neutron::server::notifications (
$auth_url = 'http://127.0.0.1:5000',
$region_name = $::os_service_default,
$endpoint_type = $::os_service_default,
$http_retries = $::os_service_default,
# DEPRECATED PARAMETERS
$tenant_id = undef,
$tenant_name = undef,
@ -153,5 +158,6 @@ Use user_domain_name instead')
'DEFAULT/notify_nova_on_port_status_changes': value => $notify_nova_on_port_status_changes;
'DEFAULT/notify_nova_on_port_data_changes': value => $notify_nova_on_port_data_changes;
'DEFAULT/send_events_interval': value => $send_events_interval;
'DEFAULT/http_retries': value => $http_retries;
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``neutron::server::notifications::http_retries`` parameter has been
added to set number of client retries.

View File

@ -46,6 +46,7 @@ describe 'neutron::server::notifications' do
should_not contain_neutron_config('nova/user_domain_id')
should contain_neutron_config('nova/user_domain_name').with_value('Default')
should contain_neutron_config('nova/endpoint_type').with_value('<SERVICE DEFAULT>')
should contain_neutron_config('DEFAULT/http_retries').with_value('<SERVICE DEFAULT>')
end
context 'when overriding parameters' do
@ -62,7 +63,8 @@ describe 'neutron::server::notifications' do
:project_domain_name => 'Default_2',
:user_domain_id => 'default_3',
:user_domain_name => 'Default_4',
:endpoint_type => 'internal'
:endpoint_type => 'internal',
:http_retries => 3,
)
end
@ -81,6 +83,7 @@ describe 'neutron::server::notifications' do
should contain_neutron_config('nova/user_domain_id').with_value('default_3')
should contain_neutron_config('nova/user_domain_name').with_value('Default_4')
should contain_neutron_config('nova/endpoint_type').with_value('internal')
should contain_neutron_config('DEFAULT/http_retries').with_value(3)
end
end