Add allow_overlapping_ips parameter to controller and neutron classes

Neutron puppet module was leaving the possibility to specify if
namespaces should be in use, while the openstack wrapper classes were
not.

Change-Id: I6f646e7c2e102adf90966b3d9b71f4f9fc0d8cd0
This commit is contained in:
sbauza
2013-09-10 14:55:44 +02:00
parent 76836baf0c
commit d2220b01f4
4 changed files with 30 additions and 19 deletions

View File

@@ -244,6 +244,7 @@ class openstack::controller (
$physical_network = 'default',
$tenant_network_type = 'gre',
$ovs_enable_tunneling = true,
$allow_overlapping_ips = false,
$ovs_local_ip = false,
$network_vlan_ranges = undef,
$bridge_interface = undef,
@@ -497,6 +498,7 @@ class openstack::controller (
tenant_network_type => $tenant_network_type,
network_vlan_ranges => $network_vlan_ranges,
ovs_enable_tunneling => $ovs_enable_tunneling,
allow_overlapping_ips => $allow_overlapping_ips,
ovs_local_ip => $ovs_local_ip_real,
bridge_uplinks => $bridge_uplinks_real,
bridge_mappings => $bridge_mappings_real,

View File

@@ -74,6 +74,10 @@
# Whether ovs tunnels should be enabled.
# (optional) Defaults to true.
#
# [allow_overlapping_ips]
# Whether IP namespaces are in use
# Optional. Defaults to 'false'.
#
# [tenant_network_type]
# Type of network to allocate for tenant networks
# Optional. Defualts to 'gre'.
@@ -167,6 +171,7 @@ class openstack::neutron (
$network_vlan_ranges = undef,
$ovs_local_ip = false,
$ovs_enable_tunneling = true,
$allow_overlapping_ips = false,
$bridge_uplinks = [],
$bridge_mappings = [],
# rely on the default set in ovs
@@ -199,16 +204,17 @@ class openstack::neutron (
) {
class { '::neutron':
enabled => $enabled,
core_plugin => $core_plugin,
bind_host => $bind_address,
rabbit_host => $rabbit_host,
rabbit_hosts => $rabbit_hosts,
rabbit_virtual_host => $rabbit_virtual_host,
rabbit_user => $rabbit_user,
rabbit_password => $rabbit_password,
verbose => $verbose,
debug => $debug,
enabled => $enabled,
core_plugin => $core_plugin,
bind_host => $bind_address,
allow_overlapping_ips => $allow_overlapping_ips,
rabbit_host => $rabbit_host,
rabbit_hosts => $rabbit_hosts,
rabbit_virtual_host => $rabbit_virtual_host,
rabbit_user => $rabbit_user,
rabbit_password => $rabbit_password,
verbose => $verbose,
debug => $debug,
}
if $enable_server {

View File

@@ -616,6 +616,7 @@ describe 'openstack::controller' do
:sql_idle_timeout => '30',
:neutron_user_password => 'q_pass',
:bridge_interface => 'eth_27',
:allow_overlapping_ips => false,
:internal_address => '10.0.0.3',
:neutron_db_password => 'q_db_pass',
:metadata_shared_secret => 'secret',
@@ -639,6 +640,7 @@ describe 'openstack::controller' do
:rabbit_virtual_host => '/',
:tenant_network_type => 'gre',
:ovs_enable_tunneling => true,
:allow_overlapping_ips => false,
:ovs_local_ip => '10.0.0.3',
:bridge_uplinks => ["br-ex:eth_27"],
:bridge_mappings => ["default:br-ex"],

View File

@@ -27,15 +27,16 @@ describe 'openstack::neutron' do
context 'install neutron with default and database password' do
it 'should perform default configuration' do
should contain_class('neutron').with(
:enabled => true,
:bind_host => '0.0.0.0',
:rabbit_host => '127.0.0.1',
:rabbit_hosts => false,
:rabbit_virtual_host => '/',
:rabbit_user => 'rabbit_user',
:rabbit_password => 'rabbit_pass',
:verbose => false,
:debug => false
:enabled => true,
:bind_host => '0.0.0.0',
:rabbit_host => '127.0.0.1',
:rabbit_hosts => false,
:rabbit_virtual_host => '/',
:rabbit_user => 'rabbit_user',
:rabbit_password => 'rabbit_pass',
:allow_overlapping_ips => false,
:verbose => false,
:debug => false
)
should contain_class('neutron::server').with(
:auth_host => '127.0.0.1',