Neutron L3: enable external provider network capability
- as an option, disable br-ex in Neutron L3 agent configuration - as an option, manage the provider network using a puppet provider - manage br-pub bridge and public interface for public bridge - backward compatibility since we keep br-ex as an option Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
@@ -59,10 +59,15 @@ describe 'cloud::compute::hypervisor' do
|
||||
tunnel_eth => '10.0.1.1',
|
||||
api_eth => '10.0.0.1',
|
||||
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||
provider_bridge_mappings => ['public:br-pub'],
|
||||
flat_networks => ['public'],
|
||||
external_int => 'eth1',
|
||||
external_bridge => 'br-pub',
|
||||
manage_ext_network => false,
|
||||
verbose => true,
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
@@ -147,17 +152,20 @@ describe 'cloud::compute::hypervisor' do
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
:tunnel_types => ['gre'],
|
||||
:bridge_mappings => ['physnet1:br-eth1'],
|
||||
:bridge_mappings => ['public:br-pub'],
|
||||
:local_ip => '10.0.1.1'
|
||||
)
|
||||
should contain_class('neutron::plugins::ml2').with(
|
||||
:type_drivers => ['gre','vlan'],
|
||||
:type_drivers => ['gre','vlan','flat'],
|
||||
:tenant_network_types => ['gre'],
|
||||
:mechanism_drivers => ['openvswitch','l2population'],
|
||||
:tunnel_id_ranges => ['1:10000'],
|
||||
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||
:enable_security_group => true
|
||||
:flat_networks => ['public'],
|
||||
:enable_security_group => true,
|
||||
:firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||
)
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
|
||||
it 'configure neutron on compute node' do
|
||||
@@ -381,6 +389,45 @@ describe 'cloud::compute::hypervisor' do
|
||||
end
|
||||
it_raises 'a Puppet::Error', /Red Hat does not support RBD backend for VMs./
|
||||
end
|
||||
|
||||
context 'when using provider external network' do
|
||||
let :pre_condition do
|
||||
"class { 'cloud::network':
|
||||
rabbit_hosts => ['10.0.0.1'],
|
||||
rabbit_password => 'secrete',
|
||||
tunnel_eth => '10.0.1.1',
|
||||
api_eth => '10.0.0.1',
|
||||
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||
provider_bridge_mappings => ['public:br-pub'],
|
||||
flat_networks => ['public'],
|
||||
external_int => 'eth1',
|
||||
external_bridge => 'br-pub',
|
||||
manage_ext_network => true,
|
||||
verbose => true,
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
dhcp_lease_duration => '10',
|
||||
log_facility => 'LOG_LOCAL0' }"
|
||||
end
|
||||
|
||||
it 'configure br-pub bridge' do
|
||||
should contain_vs_bridge('br-pub')
|
||||
end
|
||||
it 'configure eth1 in br-pub' do
|
||||
should contain_vs_port('eth1').with(
|
||||
:ensure => 'present',
|
||||
:bridge => 'br-pub'
|
||||
)
|
||||
end
|
||||
it 'configure provider external network' do
|
||||
should contain_neutron_network('public').with(
|
||||
:provider_network_type => 'flat',
|
||||
:provider_physical_network => 'public',
|
||||
:shared => true,
|
||||
:router_external => true
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
||||
Reference in New Issue
Block a user