Merge pull request #168 from enovance/bug/167/emilien
network: enable more features
This commit is contained in:
@@ -39,14 +39,24 @@
|
|||||||
# (optional) Which interface we connect to create overlay tunnels.
|
# (optional) Which interface we connect to create overlay tunnels.
|
||||||
# Default value in params
|
# Default value in params
|
||||||
#
|
#
|
||||||
|
# [*provider_vlan_ranges*]
|
||||||
|
# (optionnal) VLAN range for provider networks
|
||||||
|
# Default value in params
|
||||||
|
#
|
||||||
|
# [*provider_bridge_mappings*]
|
||||||
|
# (optionnal) Bridge mapping for provider networks
|
||||||
|
# Default value in params
|
||||||
|
#
|
||||||
|
|
||||||
class cloud::network(
|
class cloud::network(
|
||||||
$verbose = $os_params::verbose,
|
$verbose = $os_params::verbose,
|
||||||
$debug = $os_params::debug,
|
$debug = $os_params::debug,
|
||||||
$rabbit_hosts = $os_params::rabbit_hosts,
|
$rabbit_hosts = $os_params::rabbit_hosts,
|
||||||
$rabbit_password = $os_params::rabbit_password,
|
$rabbit_password = $os_params::rabbit_password,
|
||||||
$tunnel_eth = $os_params::tunnel_eth,
|
$tunnel_eth = $os_params::tunnel_eth,
|
||||||
$api_eth = $os_params::api_eth
|
$api_eth = $os_params::api_eth,
|
||||||
|
$provider_vlan_ranges = $os_params::provider_vlan_ranges,
|
||||||
|
$provider_bridge_mappings = $os_params::provider_bridge_mappings
|
||||||
) {
|
) {
|
||||||
|
|
||||||
class { 'neutron':
|
class { 'neutron':
|
||||||
@@ -65,15 +75,18 @@ class cloud::network(
|
|||||||
|
|
||||||
class { 'neutron::agents::ovs':
|
class { 'neutron::agents::ovs':
|
||||||
enable_tunneling => true,
|
enable_tunneling => true,
|
||||||
|
tunnel_types => ['gre'],
|
||||||
|
bridge_mappings => $provider_bridge_mappings,
|
||||||
local_ip => $tunnel_eth
|
local_ip => $tunnel_eth
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'neutron::plugins::ml2':
|
class { 'neutron::plugins::ml2':
|
||||||
type_drivers => ['gre'],
|
type_drivers => ['gre','vlan'],
|
||||||
tenant_network_types => ['gre'],
|
tenant_network_types => ['gre'],
|
||||||
mechanism_drivers => ['openvswitch'],
|
network_vlan_ranges => $provider_vlan_ranges,
|
||||||
tunnel_id_ranges => ['1:10000'],
|
tunnel_id_ranges => ['1:10000'],
|
||||||
enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
mechanism_drivers => ['openvswitch','l2population'],
|
||||||
|
enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -24,12 +24,14 @@ describe 'cloud::network::compute' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'cloud::network':
|
"class { 'cloud::network':
|
||||||
rabbit_hosts => ['10.0.0.1'],
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
rabbit_password => 'secrete',
|
rabbit_password => 'secrete',
|
||||||
tunnel_eth => '10.0.1.1',
|
tunnel_eth => '10.0.1.1',
|
||||||
api_eth => '10.0.0.1',
|
api_eth => '10.0.0.1',
|
||||||
verbose => true,
|
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
debug => true }"
|
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@@ -55,13 +57,16 @@ describe 'cloud::network::compute' do
|
|||||||
)
|
)
|
||||||
should contain_class('neutron::agents::ovs').with(
|
should contain_class('neutron::agents::ovs').with(
|
||||||
:enable_tunneling => true,
|
:enable_tunneling => true,
|
||||||
|
:tunnel_types => ['gre'],
|
||||||
|
:bridge_mappings => ['physnet1:br-eth1'],
|
||||||
:local_ip => '10.0.1.1'
|
:local_ip => '10.0.1.1'
|
||||||
)
|
)
|
||||||
should contain_class('neutron::plugins::ml2').with(
|
should contain_class('neutron::plugins::ml2').with(
|
||||||
:type_drivers => ['gre'],
|
:type_drivers => ['gre','vlan'],
|
||||||
:tenant_network_types => ['gre'],
|
:tenant_network_types => ['gre'],
|
||||||
:mechanism_drivers => ['openvswitch'],
|
:mechanism_drivers => ['openvswitch','l2population'],
|
||||||
:tunnel_id_ranges => ['1:10000'],
|
:tunnel_id_ranges => ['1:10000'],
|
||||||
|
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@@ -24,12 +24,14 @@ describe 'cloud::network::controller' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'cloud::network':
|
"class { 'cloud::network':
|
||||||
rabbit_hosts => ['10.0.0.1'],
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
rabbit_password => 'secrete',
|
rabbit_password => 'secrete',
|
||||||
tunnel_eth => '10.0.1.1',
|
tunnel_eth => '10.0.1.1',
|
||||||
api_eth => '10.0.0.1',
|
api_eth => '10.0.0.1',
|
||||||
verbose => true,
|
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
debug => true }"
|
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@@ -59,13 +61,16 @@ describe 'cloud::network::controller' do
|
|||||||
)
|
)
|
||||||
should contain_class('neutron::agents::ovs').with(
|
should contain_class('neutron::agents::ovs').with(
|
||||||
:enable_tunneling => true,
|
:enable_tunneling => true,
|
||||||
|
:tunnel_types => ['gre'],
|
||||||
|
:bridge_mappings => ['physnet1:br-eth1'],
|
||||||
:local_ip => '10.0.1.1'
|
:local_ip => '10.0.1.1'
|
||||||
)
|
)
|
||||||
should contain_class('neutron::plugins::ml2').with(
|
should contain_class('neutron::plugins::ml2').with(
|
||||||
:type_drivers => ['gre'],
|
:type_drivers => ['gre','vlan'],
|
||||||
:tenant_network_types => ['gre'],
|
:tenant_network_types => ['gre'],
|
||||||
:mechanism_drivers => ['openvswitch'],
|
:mechanism_drivers => ['openvswitch','l2population'],
|
||||||
:tunnel_id_ranges => ['1:10000'],
|
:tunnel_id_ranges => ['1:10000'],
|
||||||
|
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@@ -24,12 +24,14 @@ describe 'cloud::network::dhcp' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'cloud::network':
|
"class { 'cloud::network':
|
||||||
rabbit_hosts => ['10.0.0.1'],
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
rabbit_password => 'secrete',
|
rabbit_password => 'secrete',
|
||||||
tunnel_eth => '10.0.1.1',
|
tunnel_eth => '10.0.1.1',
|
||||||
api_eth => '10.0.0.1',
|
api_eth => '10.0.0.1',
|
||||||
verbose => true,
|
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
debug => true }"
|
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@@ -53,13 +55,16 @@ describe 'cloud::network::dhcp' do
|
|||||||
)
|
)
|
||||||
should contain_class('neutron::agents::ovs').with(
|
should contain_class('neutron::agents::ovs').with(
|
||||||
:enable_tunneling => true,
|
:enable_tunneling => true,
|
||||||
|
:tunnel_types => ['gre'],
|
||||||
|
:bridge_mappings => ['physnet1:br-eth1'],
|
||||||
:local_ip => '10.0.1.1'
|
:local_ip => '10.0.1.1'
|
||||||
)
|
)
|
||||||
should contain_class('neutron::plugins::ml2').with(
|
should contain_class('neutron::plugins::ml2').with(
|
||||||
:type_drivers => ['gre'],
|
:type_drivers => ['gre','vlan'],
|
||||||
:tenant_network_types => ['gre'],
|
:tenant_network_types => ['gre'],
|
||||||
:mechanism_drivers => ['openvswitch'],
|
:mechanism_drivers => ['openvswitch','l2population'],
|
||||||
:tunnel_id_ranges => ['1:10000'],
|
:tunnel_id_ranges => ['1:10000'],
|
||||||
|
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@@ -24,12 +24,14 @@ describe 'cloud::network::l3' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'cloud::network':
|
"class { 'cloud::network':
|
||||||
rabbit_hosts => ['10.0.0.1'],
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
rabbit_password => 'secrete',
|
rabbit_password => 'secrete',
|
||||||
tunnel_eth => '10.0.1.1',
|
tunnel_eth => '10.0.1.1',
|
||||||
api_eth => '10.0.0.1',
|
api_eth => '10.0.0.1',
|
||||||
verbose => true,
|
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
debug => true }"
|
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@@ -54,13 +56,16 @@ describe 'cloud::network::l3' do
|
|||||||
)
|
)
|
||||||
should contain_class('neutron::agents::ovs').with(
|
should contain_class('neutron::agents::ovs').with(
|
||||||
:enable_tunneling => true,
|
:enable_tunneling => true,
|
||||||
|
:tunnel_types => ['gre'],
|
||||||
|
:bridge_mappings => ['physnet1:br-eth1'],
|
||||||
:local_ip => '10.0.1.1'
|
:local_ip => '10.0.1.1'
|
||||||
)
|
)
|
||||||
should contain_class('neutron::plugins::ml2').with(
|
should contain_class('neutron::plugins::ml2').with(
|
||||||
:type_drivers => ['gre'],
|
:type_drivers => ['gre','vlan'],
|
||||||
:tenant_network_types => ['gre'],
|
:tenant_network_types => ['gre'],
|
||||||
:mechanism_drivers => ['openvswitch'],
|
:mechanism_drivers => ['openvswitch','l2population'],
|
||||||
:tunnel_id_ranges => ['1:10000'],
|
:tunnel_id_ranges => ['1:10000'],
|
||||||
|
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@@ -24,12 +24,14 @@ describe 'cloud::network::lbaas' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'cloud::network':
|
"class { 'cloud::network':
|
||||||
rabbit_hosts => ['10.0.0.1'],
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
rabbit_password => 'secrete',
|
rabbit_password => 'secrete',
|
||||||
tunnel_eth => '10.0.1.1',
|
tunnel_eth => '10.0.1.1',
|
||||||
api_eth => '10.0.0.1',
|
api_eth => '10.0.0.1',
|
||||||
verbose => true,
|
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
debug => true }"
|
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@@ -53,13 +55,16 @@ describe 'cloud::network::lbaas' do
|
|||||||
)
|
)
|
||||||
should contain_class('neutron::agents::ovs').with(
|
should contain_class('neutron::agents::ovs').with(
|
||||||
:enable_tunneling => true,
|
:enable_tunneling => true,
|
||||||
|
:tunnel_types => ['gre'],
|
||||||
|
:bridge_mappings => ['physnet1:br-eth1'],
|
||||||
:local_ip => '10.0.1.1'
|
:local_ip => '10.0.1.1'
|
||||||
)
|
)
|
||||||
should contain_class('neutron::plugins::ml2').with(
|
should contain_class('neutron::plugins::ml2').with(
|
||||||
:type_drivers => ['gre'],
|
:type_drivers => ['gre','vlan'],
|
||||||
:tenant_network_types => ['gre'],
|
:tenant_network_types => ['gre'],
|
||||||
:mechanism_drivers => ['openvswitch'],
|
:mechanism_drivers => ['openvswitch','l2population'],
|
||||||
:tunnel_id_ranges => ['1:10000'],
|
:tunnel_id_ranges => ['1:10000'],
|
||||||
|
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@@ -24,12 +24,14 @@ describe 'cloud::network::metadata' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'cloud::network':
|
"class { 'cloud::network':
|
||||||
rabbit_hosts => ['10.0.0.1'],
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
rabbit_password => 'secrete',
|
rabbit_password => 'secrete',
|
||||||
tunnel_eth => '10.0.1.1',
|
tunnel_eth => '10.0.1.1',
|
||||||
api_eth => '10.0.0.1',
|
api_eth => '10.0.0.1',
|
||||||
verbose => true,
|
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
debug => true }"
|
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@@ -60,13 +62,16 @@ describe 'cloud::network::metadata' do
|
|||||||
)
|
)
|
||||||
should contain_class('neutron::agents::ovs').with(
|
should contain_class('neutron::agents::ovs').with(
|
||||||
:enable_tunneling => true,
|
:enable_tunneling => true,
|
||||||
|
:tunnel_types => ['gre'],
|
||||||
|
:bridge_mappings => ['physnet1:br-eth1'],
|
||||||
:local_ip => '10.0.1.1'
|
:local_ip => '10.0.1.1'
|
||||||
)
|
)
|
||||||
should contain_class('neutron::plugins::ml2').with(
|
should contain_class('neutron::plugins::ml2').with(
|
||||||
:type_drivers => ['gre'],
|
:type_drivers => ['gre','vlan'],
|
||||||
:tenant_network_types => ['gre'],
|
:tenant_network_types => ['gre'],
|
||||||
:mechanism_drivers => ['openvswitch'],
|
:mechanism_drivers => ['openvswitch','l2population'],
|
||||||
:tunnel_id_ranges => ['1:10000'],
|
:tunnel_id_ranges => ['1:10000'],
|
||||||
|
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@@ -24,12 +24,14 @@ describe 'cloud::network::vpn' do
|
|||||||
|
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'cloud::network':
|
"class { 'cloud::network':
|
||||||
rabbit_hosts => ['10.0.0.1'],
|
rabbit_hosts => ['10.0.0.1'],
|
||||||
rabbit_password => 'secrete',
|
rabbit_password => 'secrete',
|
||||||
tunnel_eth => '10.0.1.1',
|
tunnel_eth => '10.0.1.1',
|
||||||
api_eth => '10.0.0.1',
|
api_eth => '10.0.0.1',
|
||||||
verbose => true,
|
provider_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
debug => true }"
|
provider_bridge_mappings => ['physnet1:br-eth1'],
|
||||||
|
verbose => true,
|
||||||
|
debug => true }"
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configure neutron common' do
|
it 'configure neutron common' do
|
||||||
@@ -49,13 +51,16 @@ describe 'cloud::network::vpn' do
|
|||||||
)
|
)
|
||||||
should contain_class('neutron::agents::ovs').with(
|
should contain_class('neutron::agents::ovs').with(
|
||||||
:enable_tunneling => true,
|
:enable_tunneling => true,
|
||||||
|
:tunnel_types => ['gre'],
|
||||||
|
:bridge_mappings => ['physnet1:br-eth1'],
|
||||||
:local_ip => '10.0.1.1'
|
:local_ip => '10.0.1.1'
|
||||||
)
|
)
|
||||||
should contain_class('neutron::plugins::ml2').with(
|
should contain_class('neutron::plugins::ml2').with(
|
||||||
:type_drivers => ['gre'],
|
:type_drivers => ['gre','vlan'],
|
||||||
:tenant_network_types => ['gre'],
|
:tenant_network_types => ['gre'],
|
||||||
:mechanism_drivers => ['openvswitch'],
|
:mechanism_drivers => ['openvswitch','l2population'],
|
||||||
:tunnel_id_ranges => ['1:10000'],
|
:tunnel_id_ranges => ['1:10000'],
|
||||||
|
:network_vlan_ranges => ['physnet1:1000:2999'],
|
||||||
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
:enable_security_group => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user