networking-arista: Support conn_timeout parameters

Change-Id: I04f7fdbbb2b7678e398f5ec772eb4e33bdea34fe
This commit is contained in:
Takashi Kajinami 2022-05-17 10:15:04 +09:00
parent 0e228220dd
commit b9cfc5b1ec
5 changed files with 36 additions and 15 deletions

View File

@ -42,6 +42,10 @@
# (optional) Defines if hostnames are sent to Arista EOS as FQDNS # (optional) Defines if hostnames are sent to Arista EOS as FQDNS
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*conn_timeout*]
# (optional) Connection timeout interval in seconds.
# Defaults to $::os_service_default
#
# [*package_ensure*] # [*package_ensure*]
# (optional) The intended state of the python-networking-baremetal # (optional) The intended state of the python-networking-baremetal
# package, i.e. any of the possible values of the 'ensure' # package, i.e. any of the possible values of the 'ensure'
@ -54,6 +58,7 @@ class neutron::plugins::ml2::arista(
$eapi_password, $eapi_password,
$region_name = $::os_service_default, $region_name = $::os_service_default,
$sync_interval = $::os_service_default, $sync_interval = $::os_service_default,
$conn_timeout = $::os_service_default,
$use_fqdn = $::os_service_default, $use_fqdn = $::os_service_default,
$package_ensure = 'present' $package_ensure = 'present'
) { ) {
@ -67,6 +72,7 @@ class neutron::plugins::ml2::arista(
'ml2_arista/eapi_password': value => $eapi_password, secret => true; 'ml2_arista/eapi_password': value => $eapi_password, secret => true;
'ml2_arista/region_name' : value => $region_name; 'ml2_arista/region_name' : value => $region_name;
'ml2_arista/sync_interval': value => $sync_interval; 'ml2_arista/sync_interval': value => $sync_interval;
'ml2_arista/conn_timeout' : value => $conn_timeout;
'ml2_arista/use_fqdn' : value => $use_fqdn; 'ml2_arista/use_fqdn' : value => $use_fqdn;
} }

View File

@ -42,6 +42,10 @@
# the EOS. # the EOS.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*conn_timeout*]
# (optional) Connection timeout interval in seconds.
# Defaults to $::os_service_default
#
# [*use_vrf*] # [*use_vrf*]
# (optional) If it should create a router in VRF. # (optional) If it should create a router in VRF.
# Defaults to $::os_service_default # Defaults to $::os_service_default
@ -53,8 +57,8 @@ class neutron::plugins::ml2::arista::l3(
$secondary_l3_host = $::os_service_default, $secondary_l3_host = $::os_service_default,
$mlag_config = $::os_service_default, $mlag_config = $::os_service_default,
$l3_sync_interval = $::os_service_default, $l3_sync_interval = $::os_service_default,
$use_vrf = $::os_service_default $conn_timeout = $::os_service_default,
$use_vrf = $::os_service_default,
) { ) {
include neutron::deps include neutron::deps
@ -74,6 +78,7 @@ class neutron::plugins::ml2::arista::l3(
'l3_arista/secondary_l3_host' : value => $secondary_l3_host; 'l3_arista/secondary_l3_host' : value => $secondary_l3_host;
'l3_arista/mlag_config' : value => $mlag_config; 'l3_arista/mlag_config' : value => $mlag_config;
'l3_arista/l3_sync_interval' : value => $l3_sync_interval; 'l3_arista/l3_sync_interval' : value => $l3_sync_interval;
'l3_arista/conn_timeout' : value => $conn_timeout;
'l3_arista/use_vrf' : value => $use_vrf; 'l3_arista/use_vrf' : value => $use_vrf;
} }
} }

View File

@ -0,0 +1,6 @@
---
features:
- |
The ``neutron::plugins::ml2::arista`` class and
the ``neutron::plugins::ml2::arista::l3`` class now support the new
``conn_timeout`` parameter.

View File

@ -34,6 +34,7 @@ describe 'neutron::plugins::ml2::arista::l3' do
:secondary_l3_host => '<SERVICE DEFAULT>', :secondary_l3_host => '<SERVICE DEFAULT>',
:mlag_config => '<SERVICE DEFAULT>', :mlag_config => '<SERVICE DEFAULT>',
:l3_sync_interval => '<SERVICE DEFAULT>', :l3_sync_interval => '<SERVICE DEFAULT>',
:conn_timeout => '<SERVICE DEFAULT>',
:use_vrf => '<SERVICE DEFAULT>' :use_vrf => '<SERVICE DEFAULT>'
} }
end end
@ -57,6 +58,7 @@ describe 'neutron::plugins::ml2::arista::l3' do
should contain_neutron_plugin_ml2('l3_arista/secondary_l3_host').with_value(p[:secondary_l3_host]) should contain_neutron_plugin_ml2('l3_arista/secondary_l3_host').with_value(p[:secondary_l3_host])
should contain_neutron_plugin_ml2('l3_arista/mlag_config').with_value(p[:mlag_config]) should contain_neutron_plugin_ml2('l3_arista/mlag_config').with_value(p[:mlag_config])
should contain_neutron_plugin_ml2('l3_arista/l3_sync_interval').with_value(p[:l3_sync_interval]) should contain_neutron_plugin_ml2('l3_arista/l3_sync_interval').with_value(p[:l3_sync_interval])
should contain_neutron_plugin_ml2('l3_arista/conn_timeout').with_value(p[:conn_timeout])
should contain_neutron_plugin_ml2('l3_arista/use_vrf').with_value(p[:use_vrf]) should contain_neutron_plugin_ml2('l3_arista/use_vrf').with_value(p[:use_vrf])
end end

View File

@ -33,6 +33,7 @@ describe 'neutron::plugins::ml2::arista' do
{ {
:region_name => '<SERVICE DEFAULT>', :region_name => '<SERVICE DEFAULT>',
:sync_interval => '<SERVICE DEFAULT>', :sync_interval => '<SERVICE DEFAULT>',
:conn_timeout => '<SERVICE DEFAULT>',
:use_fqdn => '<SERVICE DEFAULT>' :use_fqdn => '<SERVICE DEFAULT>'
} }
end end
@ -55,6 +56,7 @@ describe 'neutron::plugins::ml2::arista' do
should contain_neutron_plugin_ml2('ml2_arista/eapi_password').with_value(p[:eapi_password]).with_secret(true) should contain_neutron_plugin_ml2('ml2_arista/eapi_password').with_value(p[:eapi_password]).with_secret(true)
should contain_neutron_plugin_ml2('ml2_arista/region_name').with_value(p[:region_name]) should contain_neutron_plugin_ml2('ml2_arista/region_name').with_value(p[:region_name])
should contain_neutron_plugin_ml2('ml2_arista/sync_interval').with_value(p[:sync_interval]) should contain_neutron_plugin_ml2('ml2_arista/sync_interval').with_value(p[:sync_interval])
should contain_neutron_plugin_ml2('ml2_arista/conn_timeout').with_value(p[:conn_timeout])
should contain_neutron_plugin_ml2('ml2_arista/use_fqdn').with_value(p[:use_fqdn]) should contain_neutron_plugin_ml2('ml2_arista/use_fqdn').with_value(p[:use_fqdn])
end end