Bring ML2 Linuxbridge plugin support

* Allow to use ml2_lb agent (ML2 with linuxbridge)
* Add linuxbridge to mechanism_drivers in Neutron Plugin configuration
  when using ML2.

Change-Id: Ic80b3c6830f36cae10a292329cf207f5996ce778
This commit is contained in:
Emilien Macchi 2014-12-02 14:53:19 -05:00
parent 3846a044a3
commit f1391db64a
3 changed files with 19 additions and 5 deletions

View File

@ -102,7 +102,7 @@ class cloud::network::controller(
network_vlan_ranges => $provider_vlan_ranges, network_vlan_ranges => $provider_vlan_ranges,
tunnel_id_ranges => ['1:10000'], tunnel_id_ranges => ['1:10000'],
flat_networks => $flat_networks, flat_networks => $flat_networks,
mechanism_drivers => ['openvswitch','l2population'], mechanism_drivers => ['linuxbridge','openvswitch','l2population'],
enable_security_group => true enable_security_group => true
} }
} }

View File

@ -19,7 +19,7 @@
# #
# [*driver*] # [*driver*]
# (optional) Neutron vswitch driver # (optional) Neutron vswitch driver
# Supported values: 'ml2_ovs', 'n1kv_vem'. # Supported values: 'ml2_ovs', 'ml2_lb', 'n1kv_vem'.
# Note: 'n1kv_vem' currently works only on Red Hat systems. # Note: 'n1kv_vem' currently works only on Red Hat systems.
# Defaults to 'ml2_ovs' # Defaults to 'ml2_ovs'
# #
@ -132,10 +132,11 @@ class cloud::network::vswitch(
$external_int = 'eth1', $external_int = 'eth1',
$external_bridge = 'br-pub', $external_bridge = 'br-pub',
$firewall_settings = {}, $firewall_settings = {},
# ml2_ovs # common to ml2
$tunnel_types = ['gre'], $tunnel_types = ['gre'],
$provider_bridge_mappings = ['public:br-pub'],
$tunnel_eth = '127.0.0.1', $tunnel_eth = '127.0.0.1',
# ml2_ovs
$provider_bridge_mappings = ['public:br-pub'],
# n1kv_vem # n1kv_vem
$n1kv_vsm_ip = '127.0.0.1', $n1kv_vsm_ip = '127.0.0.1',
$n1kv_vsm_domain_id = 1000, $n1kv_vsm_domain_id = 1000,
@ -166,6 +167,19 @@ class cloud::network::vswitch(
} }
} }
'ml2_lb': {
class { 'neutron::agents::ml2::linuxbridge':
l2_population => true,
polling_interval => '15',
tunnel_types => $tunnel_types,
local_ip => $tunnel_eth
}
if $::osfamily == 'RedHat' {
kmod::load { 'ip_gre': }
}
}
'n1kv_vem': { 'n1kv_vem': {
# We don't check if we are on Red Hat system # We don't check if we are on Red Hat system
# (already done by puppet-neutron) # (already done by puppet-neutron)

View File

@ -73,7 +73,7 @@ describe 'cloud::network::controller' do
is_expected.to contain_class('neutron::plugins::ml2').with( is_expected.to contain_class('neutron::plugins::ml2').with(
:type_drivers => ['gre', 'vlan', 'flat'], :type_drivers => ['gre', 'vlan', 'flat'],
:tenant_network_types => ['gre'], :tenant_network_types => ['gre'],
:mechanism_drivers => ['openvswitch','l2population'], :mechanism_drivers => ['linuxbridge','openvswitch','l2population'],
:tunnel_id_ranges => ['1:10000'], :tunnel_id_ranges => ['1:10000'],
:network_vlan_ranges => ['physnet1:1000:2999'], :network_vlan_ranges => ['physnet1:1000:2999'],
:flat_networks => ['public'], :flat_networks => ['public'],