Add support for [neutron] service_type

Change-Id: I3e45823c6843308e6ce588dc064ad3ff28de4fcd
This commit is contained in:
Takashi Kajinami 2021-11-12 13:59:04 +09:00
parent ad4f0cb783
commit c49d72d42b
3 changed files with 15 additions and 1 deletions

View File

@ -60,6 +60,10 @@
# call.
# Defaults to $::os_service_default
#
# [*service_type*]
# (optional) The default service_type for endpoint URL discovery.
# Defaults to $::os_service_default
#
# [*ovs_bridge*]
# (optional) Name of Integration Bridge used by Open vSwitch
# Defaults to 'br-int'
@ -97,6 +101,7 @@ class nova::network::neutron (
$timeout = '30',
$region_name = 'RegionOne',
$http_retries = $::os_service_default,
$service_type = $::os_service_default,
$ovs_bridge = 'br-int',
$extension_sync_interval = '600',
$vif_plugging_is_fatal = true,
@ -120,9 +125,10 @@ class nova::network::neutron (
'neutron/auth_url': value => $auth_url;
'neutron/valid_interfaces': value => join(any2array($valid_interfaces), ',');
'neutron/endpoint_override': value => $endpoint_override;
'neutron/http_retries': value => $http_retries;
'neutron/service_type': value => $service_type;
'neutron/ovs_bridge': value => $ovs_bridge;
'neutron/extension_sync_interval': value => $extension_sync_interval;
'neutron/auth_type': value => $auth_type;
'neutron/http_retries': value => $http_retries;
}
}

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``nova::network::neutron::service_type`` parameter has been added.

View File

@ -14,6 +14,7 @@ describe 'nova::network::neutron' do
:valid_interfaces => '<SERVICE DEFAULT>',
:endpoint_override => '<SERVICE DEFAULT>',
:http_retries => '<SERVICE DEFAULT>',
:service_type => '<SERVICE DEFAULT>',
:ovs_bridge => 'br-int',
:extension_sync_interval => '600',
:vif_plugging_is_fatal => true,
@ -44,6 +45,7 @@ describe 'nova::network::neutron' do
should contain_nova_config('neutron/valid_interfaces').with_value(default_params[:valid_interfaces])
should contain_nova_config('neutron/endpoint_override').with_value(default_params[:endpoint_override])
should contain_nova_config('neutron/http_retries').with_value(default_params[:http_retries])
should contain_nova_config('neutron/service_type').with_value(default_params[:service_type])
should contain_nova_config('neutron/extension_sync_interval').with_value(default_params[:extension_sync_interval])
should contain_nova_config('neutron/ovs_bridge').with_value(default_params[:ovs_bridge])
end
@ -67,6 +69,7 @@ describe 'nova::network::neutron' do
:valid_interfaces => 'internal,public',
:endpoint_override => 'http://127.0.0.1:9696',
:http_retries => 3,
:service_type => 'network',
:ovs_bridge => 'br-int',
:extension_sync_interval => '600',
:vif_plugging_is_fatal => false,
@ -88,6 +91,7 @@ describe 'nova::network::neutron' do
should contain_nova_config('neutron/valid_interfaces').with_value(params[:valid_interfaces])
should contain_nova_config('neutron/endpoint_override').with_value(params[:endpoint_override])
should contain_nova_config('neutron/http_retries').with_value(params[:http_retries])
should contain_nova_config('neutron/service_type').with_value(params[:service_type])
should contain_nova_config('neutron/extension_sync_interval').with_value(params[:extension_sync_interval])
should contain_nova_config('neutron/ovs_bridge').with_value(params[:ovs_bridge])
end