diff --git a/manifests/agents/lbaas.pp b/manifests/agents/lbaas.pp index 1d9b8084c..93377521f 100644 --- a/manifests/agents/lbaas.pp +++ b/manifests/agents/lbaas.pp @@ -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; } diff --git a/manifests/server.pp b/manifests/server.pp index 30da0f21f..2277b92a7 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -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; } diff --git a/releasenotes/notes/add-neutron-lbaas-parameters-a0c970a8bb0e1da9.yaml b/releasenotes/notes/add-neutron-lbaas-parameters-a0c970a8bb0e1da9.yaml new file mode 100644 index 000000000..0e420be3c --- /dev/null +++ b/releasenotes/notes/add-neutron-lbaas-parameters-a0c970a8bb0e1da9.yaml @@ -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 diff --git a/spec/classes/neutron_agents_lbaas_spec.rb b/spec/classes/neutron_agents_lbaas_spec.rb index 989fde6b3..0170b6d11 100644 --- a/spec/classes/neutron_agents_lbaas_spec.rb +++ b/spec/classes/neutron_agents_lbaas_spec.rb @@ -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(''); 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 diff --git a/spec/classes/neutron_server_spec.rb b/spec/classes/neutron_server_spec.rb index 8ae358d86..dae41d0cf 100644 --- a/spec/classes/neutron_server_spec.rb +++ b/spec/classes/neutron_server_spec.rb @@ -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('') is_expected.to contain_neutron_config('oslo_middleware/enable_proxy_headers_parsing').with_value('') + is_expected.to contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('') 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