Merge "Add DPDK support for OVN"

This commit is contained in:
Zuul 2019-04-02 18:05:27 +00:00 committed by Gerrit Code Review
commit ae0af41c7f
2 changed files with 13 additions and 0 deletions

View File

@ -58,6 +58,11 @@
# if a subnet's dns_nameservers is empty.
# Type: List
# Defaults to $::os_service_default
#
# [*vhostuser_socket_dir*]
# (optional) The vhost-user socket directory for OVS
# Type: String
# Defaults to $::os_service_default
class neutron::plugins::ml2::ovn(
$ovn_nb_connection = $::os_service_default,
@ -70,6 +75,7 @@ class neutron::plugins::ml2::ovn(
$ovn_metadata_enabled = $::os_service_default,
$dvr_enabled = $::os_service_default,
$dns_servers = $::os_service_default,
$vhostuser_socket_dir = $::os_service_default,
) {
include ::neutron::deps
@ -104,5 +110,6 @@ class neutron::plugins::ml2::ovn(
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
'ovn/enable_distributed_floating_ip' : value => $dvr_enabled;
'ovn/dns_servers' : value => join(any2array($dns_servers), ',');
'ovn/vhostuser_socket_dir' : value => $vhostuser_socket_dir;
}
}

View File

@ -41,6 +41,7 @@ describe 'neutron::plugins::ml2::ovn' do
should contain_neutron_plugin_ml2('ovn/vif_type').with_value(params[:vif_type])
should contain_neutron_plugin_ml2('ovn/enable_distributed_floating_ip').with_value(params[:dvr_enabled])
should contain_neutron_plugin_ml2('ovn/dns_servers').with_value(params[:dns_servers].join(','))
should contain_neutron_plugin_ml2('ovn/vhostuser_socket_dir').with_value('<SERVICE DEFAULT>')
end
end
@ -53,6 +54,7 @@ describe 'neutron::plugins::ml2::ovn' do
before :each do
params.clear
params.merge!(default_params)
params.merge!(:vhostuser_socket_dir => 'test')
end
it 'should fail with invalid neutron_sync_mode' do
@ -67,6 +69,10 @@ describe 'neutron::plugins::ml2::ovn' do
should contain_neutron_plugin_ml2('ovn/vif_type').with_value('<SERVICE DEFAULT>')
end
it 'should contain valid vhostuser socket dir' do
should contain_neutron_plugin_ml2('ovn/vhostuser_socket_dir').with_value('test')
end
context 'with DVR' do
before :each do
params.merge!(:dvr_enabled => true)