neutron: Allow user to specify tunnel_type (gre, vxlan, etc...)
This patch allows a deployer to specify which tunnel_type s/he wants her openstack installation to rely on.
This commit is contained in:
parent
835e962b06
commit
f5749312a4
@ -75,8 +75,23 @@
|
||||
# Defaults to 'LOG_LOCAL0'
|
||||
#
|
||||
# [*dhcp_lease_duration*]
|
||||
# (optionnal) DHCP Lease duration (in seconds)
|
||||
# Defauls to '120'
|
||||
# (optional) DHCP Lease duration (in seconds)
|
||||
# Defaults to '120'
|
||||
#
|
||||
# [*tunnel_types*]
|
||||
# (optional) Handled tunnel types
|
||||
# Defaults to ['gre']
|
||||
# Possible value ['local', 'flat', 'vlan', 'gre', 'vxlan']
|
||||
#
|
||||
# [*tenant_network_types*]
|
||||
# (optional) Handled tenant network types
|
||||
# Defaults to ['gre']
|
||||
# Possible value ['local', 'flat', 'vlan', 'gre', 'vxlan']
|
||||
#
|
||||
# [*type_drivers*]
|
||||
# (optional) Drivers to load
|
||||
# Defaults to ['gre', 'vlan', 'flat']
|
||||
# Possible value ['local', 'flat', 'vlan', 'gre', 'vxlan']
|
||||
#
|
||||
|
||||
class cloud::network(
|
||||
@ -94,7 +109,10 @@ class cloud::network(
|
||||
$flat_networks = ['public'],
|
||||
$external_int = 'eth1',
|
||||
$external_bridge = 'br-pub',
|
||||
$manage_ext_network = false
|
||||
$manage_ext_network = false,
|
||||
$tunnel_types = ['gre'],
|
||||
$tenant_network_types = ['gre'],
|
||||
$type_drivers = ['gre', 'vlan', 'flat'],
|
||||
) {
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
@ -135,14 +153,14 @@ class cloud::network(
|
||||
|
||||
class { 'neutron::agents::ovs':
|
||||
enable_tunneling => true,
|
||||
tunnel_types => ['gre'],
|
||||
tunnel_types => $tunnel_types,
|
||||
bridge_mappings => $provider_bridge_mappings,
|
||||
local_ip => $tunnel_eth
|
||||
}
|
||||
|
||||
class { 'neutron::plugins::ml2':
|
||||
type_drivers => ['gre','vlan','flat'],
|
||||
tenant_network_types => ['gre'],
|
||||
type_drivers => $type_drivers,
|
||||
tenant_network_types => $tenant_network_types,
|
||||
network_vlan_ranges => $provider_vlan_ranges,
|
||||
tunnel_id_ranges => ['1:10000'],
|
||||
flat_networks => $flat_networks,
|
||||
@ -155,7 +173,7 @@ class cloud::network(
|
||||
# config file, only ML2. I need to patch puppet-neutron.
|
||||
# Follow-up: https://github.com/enovance/puppet-openstack-cloud/issues/199
|
||||
neutron_plugin_ml2 {
|
||||
'agent/tunnel_types': value => ['gre'];
|
||||
'agent/tunnel_types': value => $tunnel_types;
|
||||
'agent/l2_population': value => true;
|
||||
'agent/polling_interval': value => '15';
|
||||
'OVS/local_ip': value => $tunnel_eth;
|
||||
|
@ -37,6 +37,9 @@ describe 'cloud::network::controller' do
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
tunnel_types => ['vxlan'],
|
||||
tenant_network_types => ['vxlan'],
|
||||
type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
@ -78,13 +81,13 @@ describe 'cloud::network::controller' do
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
:tunnel_types => ['gre'],
|
||||
:tunnel_types => ['vxlan'],
|
||||
:bridge_mappings => ['public:br-pub'],
|
||||
:local_ip => '10.0.1.1'
|
||||
)
|
||||
should contain_class('neutron::plugins::ml2').with(
|
||||
:type_drivers => ['gre','vlan','flat'],
|
||||
:tenant_network_types => ['gre'],
|
||||
:type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
:tenant_network_types => ['vxlan'],
|
||||
:mechanism_drivers => ['openvswitch','l2population'],
|
||||
:tunnel_id_ranges => ['1:10000'],
|
||||
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||
|
@ -37,6 +37,9 @@ describe 'cloud::network::dhcp' do
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
tunnel_types => ['vxlan'],
|
||||
tenant_network_types => ['vxlan'],
|
||||
type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
@ -66,13 +69,13 @@ describe 'cloud::network::dhcp' do
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
:tunnel_types => ['gre'],
|
||||
:tunnel_types => ['vxlan'],
|
||||
:bridge_mappings => ['public:br-pub'],
|
||||
:local_ip => '10.0.1.1'
|
||||
)
|
||||
should contain_class('neutron::plugins::ml2').with(
|
||||
:type_drivers => ['gre','vlan','flat'],
|
||||
:tenant_network_types => ['gre'],
|
||||
:type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
:tenant_network_types => ['vxlan'],
|
||||
:mechanism_drivers => ['openvswitch','l2population'],
|
||||
:tunnel_id_ranges => ['1:10000'],
|
||||
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||
|
@ -37,6 +37,9 @@ describe 'cloud::network::l3' do
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
tunnel_types => ['vxlan'],
|
||||
tenant_network_types => ['vxlan'],
|
||||
type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
@ -66,13 +69,13 @@ describe 'cloud::network::l3' do
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
:tunnel_types => ['gre'],
|
||||
:tunnel_types => ['vxlan'],
|
||||
:bridge_mappings => ['public:br-pub'],
|
||||
:local_ip => '10.0.1.1'
|
||||
)
|
||||
should contain_class('neutron::plugins::ml2').with(
|
||||
:type_drivers => ['gre','vlan','flat'],
|
||||
:tenant_network_types => ['gre'],
|
||||
:type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
:tenant_network_types => ['vxlan'],
|
||||
:mechanism_drivers => ['openvswitch','l2population'],
|
||||
:tunnel_id_ranges => ['1:10000'],
|
||||
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||
|
@ -37,6 +37,9 @@ describe 'cloud::network::lbaas' do
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
tunnel_types => ['vxlan'],
|
||||
tenant_network_types => ['vxlan'],
|
||||
type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
@ -66,13 +69,13 @@ describe 'cloud::network::lbaas' do
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
:tunnel_types => ['gre'],
|
||||
:tunnel_types => ['vxlan'],
|
||||
:bridge_mappings => ['public:br-pub'],
|
||||
:local_ip => '10.0.1.1'
|
||||
)
|
||||
should contain_class('neutron::plugins::ml2').with(
|
||||
:type_drivers => ['gre','vlan','flat'],
|
||||
:tenant_network_types => ['gre'],
|
||||
:type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
:tenant_network_types => ['vxlan'],
|
||||
:mechanism_drivers => ['openvswitch','l2population'],
|
||||
:tunnel_id_ranges => ['1:10000'],
|
||||
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||
|
@ -37,6 +37,9 @@ describe 'cloud::network::metadata' do
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
tunnel_types => ['vxlan'],
|
||||
tenant_network_types => ['vxlan'],
|
||||
type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
@ -74,13 +77,13 @@ describe 'cloud::network::metadata' do
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
:tunnel_types => ['gre'],
|
||||
:tunnel_types => ['vxlan'],
|
||||
:bridge_mappings => ['public:br-pub'],
|
||||
:local_ip => '10.0.1.1'
|
||||
)
|
||||
should contain_class('neutron::plugins::ml2').with(
|
||||
:type_drivers => ['gre','vlan','flat'],
|
||||
:tenant_network_types => ['gre'],
|
||||
:type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
:tenant_network_types => ['vxlan'],
|
||||
:mechanism_drivers => ['openvswitch','l2population'],
|
||||
:tunnel_id_ranges => ['1:10000'],
|
||||
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||
|
@ -37,6 +37,9 @@ describe 'cloud::network::vpn' do
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
tunnel_types => ['vxlan'],
|
||||
tenant_network_types => ['vxlan'],
|
||||
type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
@ -61,13 +64,13 @@ describe 'cloud::network::vpn' do
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
:tunnel_types => ['gre'],
|
||||
:tunnel_types => ['vxlan'],
|
||||
:bridge_mappings => ['public:br-pub'],
|
||||
:local_ip => '10.0.1.1'
|
||||
)
|
||||
should contain_class('neutron::plugins::ml2').with(
|
||||
:type_drivers => ['gre','vlan','flat'],
|
||||
:tenant_network_types => ['gre'],
|
||||
:type_drivers => ['gre', 'vlan', 'flat', 'vxlan'],
|
||||
:tenant_network_types => ['vxlan'],
|
||||
:mechanism_drivers => ['openvswitch','l2population'],
|
||||
:tunnel_id_ranges => ['1:10000'],
|
||||
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user