Skip to content

Commit

Permalink
Merge "Add parameter to set veth MTU"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed May 28, 2014
2 parents f48ce94 + 3b6abf0 commit 10abb38
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
9 changes: 8 additions & 1 deletion manifests/agents/ovs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
$tunnel_bridge = 'br-tun',
$vxlan_udp_port = 4789,
$polling_interval = 2,
$firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
$firewall_driver = 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
$veth_mtu = undef
) {

include neutron::params
Expand Down Expand Up @@ -150,4 +151,10 @@
}
}
}

if $veth_mtu {
neutron_plugin_ovs { 'AGENT/veth_mtu': value => $veth_mtu }
} else {
neutron_plugin_ovs { 'AGENT/veth_mtu': ensure => absent }
}
}
15 changes: 14 additions & 1 deletion spec/classes/neutron_agents_ovs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
:local_ip => false,
:tunnel_bridge => 'br-tun',
:polling_interval => 2,
:firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver' }
:firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
:veth_mtu => ''
}
end

let :params do
Expand All @@ -40,6 +42,7 @@
should contain_neutron_plugin_ovs('OVS/enable_tunneling').with_value(false)
should contain_neutron_plugin_ovs('OVS/tunnel_bridge').with_ensure('absent')
should contain_neutron_plugin_ovs('OVS/local_ip').with_ensure('absent')
should contain_neutron_plugin_ovs('AGENT/veth_mtu').with_ensure('absent')
end

it 'configures vs_bridge' do
Expand Down Expand Up @@ -71,6 +74,16 @@
)
end

context 'with veth_mtu set' do
before :each do
params.merge(:veth_mtu => '9000')
end

it 'should set the veth_mtu on the ovs agent' do
should contain_neutron_plugin_ovs('AGENT/veth_mtu').with_value(params[:veth_mtu])
end
end

context 'when not installing ovs agent package' do
before :each do
params.merge!(:package_ensure => 'absent')
Expand Down

0 comments on commit 10abb38

Please sign in to comment.