Merge "Added parameters to assign already present options in neutron.conf and lbaas_agent.ini"

This commit is contained in:
Zuul 2017-11-13 16:08:15 +00:00 committed by Gerrit Code Review
commit 2f6c873960
5 changed files with 37 additions and 0 deletions

View File

@ -37,6 +37,10 @@
# in the lbaas config.
# Defaults to false.
#
# [*ovs_use_veth*]
# (optional) Uses veth for an interface or not.
# Defaults to false.
#
class neutron::agents::lbaas (
$package_ensure = present,
$enabled = true,
@ -44,6 +48,7 @@ class neutron::agents::lbaas (
$debug = $::os_service_default,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$device_driver = 'neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver',
$ovs_use_veth = $::os_service_default,
$user_group = $::neutron::params::nobody_user_group,
$manage_haproxy_package = true,
$purge_config = false,
@ -75,6 +80,7 @@ class neutron::agents::lbaas (
'DEFAULT/debug': value => $debug;
'DEFAULT/interface_driver': value => $interface_driver;
'DEFAULT/device_driver': value => $device_driver;
'DEFAULT/ovs_use_veth': value => $ovs_use_veth;
'haproxy/user_group': value => $user_group;
}

View File

@ -215,6 +215,10 @@
# HTTPProxyToWSGI middleware.
# Defaults to $::os_service_default.
#
# [*ovs_integration_bridge*]
# (optional) Name of Open vSwitch bridge to use
# Defaults to ::os_service_default
#
# == Deprecated
#
# [*qos_notification_drivers*]
@ -257,6 +261,7 @@ class neutron::server (
$service_providers = $::os_service_default,
$auth_strategy = 'keystone',
$enable_proxy_headers_parsing = $::os_service_default,
$ovs_integration_bridge = $::os_service_default,
# DEPRECATED PARAMETERS
$log_dir = undef,
$log_file = undef,
@ -341,6 +346,7 @@ class neutron::server (
'DEFAULT/dhcp_load_type': value => $dhcp_load_type;
'DEFAULT/default_availability_zones': value => join(any2array($default_availability_zones), ',');
'DEFAULT/network_auto_schedule': value => $network_auto_schedule;
'DEFAULT/ovs_integration_bridge': value => $ovs_integration_bridge;
'service_providers/service_provider': value => $service_providers;
}

View File

@ -0,0 +1,5 @@
---
features:
- Adds ovs_integration_bridge config option in
neutron.conf and adds ovs_veth_use config
option in lbaas_agent.ini

View File

@ -48,6 +48,7 @@ describe 'neutron::agents::lbaas' do
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]);
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/device_driver').with_value(p[:device_driver]);
is_expected.to contain_neutron_lbaas_agent_config('haproxy/user_group').with_value(platform_params[:nobody_user_group]);
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/ovs_use_veth').with_value('<SERVICE DEFAULT>');
end
it 'installs neutron lbaas agent package' do
@ -80,6 +81,15 @@ describe 'neutron::agents::lbaas' do
)
end
end
context 'with ovs_use_veth as false' do
before :each do
params.merge!(:ovs_use_veth => false)
end
it 'should have ovs_use_veth set to false' do
is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/ovs_use_veth').with_value(false);
end
end
end
shared_examples_for 'haproxy lbaas_driver' do

View File

@ -79,6 +79,7 @@ describe 'neutron::server' do
is_expected.to contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver])
is_expected.to contain_neutron_config('qos/notification_drivers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('<SERVICE DEFAULT>')
end
context 'with manage_service as false' do
@ -263,6 +264,15 @@ describe 'neutron::server' do
)
end
end
context 'with ovs_integration_bridge set' do
before :each do
params.merge!({:ovs_integration_bridge => 'br-int' })
end
it { is_expected.to contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('br-int') }
end
end
shared_examples_for 'VPNaaS, FWaaS and LBaaS package installation' do