Merge "Add related parameters to ovs section"
This commit is contained in:
@@ -113,6 +113,14 @@
|
||||
# (optional) Extensions list to use
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*int_peer_patch_port*]
|
||||
# (optional) Peer patch port in integration bridge for tunnel bridge
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*tun_peer_patch_port*]
|
||||
# (optional) Peer patch port in tunnel bridge for integration bridge
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class neutron::agents::ml2::ovs (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
@@ -134,6 +142,8 @@ class neutron::agents::ml2::ovs (
|
||||
$drop_flows_on_start = false,
|
||||
$manage_vswitch = true,
|
||||
$prevent_arp_spoofing = $::os_service_default,
|
||||
$int_peer_patch_port = $::os_service_default,
|
||||
$tun_peer_patch_port = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::params
|
||||
@@ -201,9 +211,11 @@ class neutron::agents::ml2::ovs (
|
||||
|
||||
if $enable_tunneling {
|
||||
neutron_agent_ovs {
|
||||
'ovs/enable_tunneling': value => true;
|
||||
'ovs/tunnel_bridge': value => $tunnel_bridge;
|
||||
'ovs/local_ip': value => $local_ip;
|
||||
'ovs/enable_tunneling': value => true;
|
||||
'ovs/tunnel_bridge': value => $tunnel_bridge;
|
||||
'ovs/local_ip': value => $local_ip;
|
||||
'ovs/int_peer_patch_port': value => $int_peer_patch_port;
|
||||
'ovs/tun_peer_patch_port': value => $tun_peer_patch_port;
|
||||
}
|
||||
|
||||
if size($tunnel_types) > 0 {
|
||||
@@ -219,9 +231,11 @@ class neutron::agents::ml2::ovs (
|
||||
}
|
||||
} else {
|
||||
neutron_agent_ovs {
|
||||
'ovs/enable_tunneling': value => false;
|
||||
'ovs/tunnel_bridge': ensure => absent;
|
||||
'ovs/local_ip': ensure => absent;
|
||||
'ovs/enable_tunneling': value => false;
|
||||
'ovs/tunnel_bridge': ensure => absent;
|
||||
'ovs/local_ip': ensure => absent;
|
||||
'ovs/int_peer_patch_port': ensure => absent;
|
||||
'ovs/tun_peer_patch_port': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
:tunnel_bridge => 'br-tun',
|
||||
:drop_flows_on_start => false,
|
||||
:firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver',
|
||||
:manage_vswitch => true }
|
||||
:manage_vswitch => true,
|
||||
}
|
||||
end
|
||||
|
||||
let :test_facts do
|
||||
@@ -50,6 +51,8 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/enable_tunneling').with_value(false)
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/tunnel_bridge').with_ensure('absent')
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/local_ip').with_ensure('absent')
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/int_peer_patch_port').with_ensure('absent')
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/tun_peer_patch_port').with_ensure('absent')
|
||||
end
|
||||
|
||||
it 'installs neutron ovs agent package' do
|
||||
@@ -198,6 +201,8 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/enable_tunneling').with_value(true)
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/tunnel_bridge').with_value(default_params[:tunnel_bridge])
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/local_ip').with_value('127.0.0.1')
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/int_peer_patch_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/tun_peer_patch_port').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user