Reintroduce support for provider networks
There are two problems with provider networks: First, the way bridge mappings are done prevents users from having mutliple provider networks. This patch allows the user to pass them in directly. Second, change 38426 proposes changing the behavior of network_vlan_ranges and this patch will reflect that by passing down undef unless the user wishes to override the defaults specified in quantum::plugins::ovs Change-Id: I36b11f9e0fa5458e50cbe59c8f4a5d1f3d9bdaa6
This commit is contained in:
@@ -56,6 +56,8 @@ class openstack::compute (
|
||||
$quantum_host = '127.0.0.1',
|
||||
$ovs_local_ip = false,
|
||||
$quantum_firewall_driver = false,
|
||||
$bridge_mappings = undef,
|
||||
$bridge_uplinks = undef,
|
||||
# Nova
|
||||
$nova_admin_tenant_name = 'services',
|
||||
$nova_admin_user = 'nova',
|
||||
@@ -222,6 +224,8 @@ class openstack::compute (
|
||||
enabled => $enabled,
|
||||
enable_server => false,
|
||||
verbose => $verbose,
|
||||
bridge_mappings => $bridge_mappings,
|
||||
bridge_uplinks => $bridge_uplinks
|
||||
}
|
||||
|
||||
class { 'nova::compute::quantum':
|
||||
|
@@ -222,9 +222,11 @@ class openstack::controller (
|
||||
$tenant_network_type = 'gre',
|
||||
$ovs_enable_tunneling = true,
|
||||
$ovs_local_ip = false,
|
||||
$network_vlan_ranges = 'physnet1:1000:2000',
|
||||
$network_vlan_ranges = undef,
|
||||
$bridge_interface = undef,
|
||||
$external_bridge_name = 'br-ex',
|
||||
$bridge_uplinks = undef,
|
||||
$bridge_mappings = undef,
|
||||
$enable_ovs_agent = true,
|
||||
$enable_dhcp_agent = true,
|
||||
$enable_l3_agent = true,
|
||||
@@ -427,6 +429,18 @@ class openstack::controller (
|
||||
fail('bridge_interface must be set when configuring quantum')
|
||||
}
|
||||
|
||||
if ! $bridge_uplinks {
|
||||
$bridge_uplinks_real = ["${external_bridge_name}:${bridge_interface}"]
|
||||
} else {
|
||||
$bridge_uplinks_real = $bridge_uplinks
|
||||
}
|
||||
|
||||
if ! $bridge_mappings {
|
||||
$bridge_mappings_real = ["${physical_network}:${external_bridge_name}"]
|
||||
} else {
|
||||
$bridge_mappings_real = $bridge_mappings
|
||||
}
|
||||
|
||||
class { 'openstack::quantum':
|
||||
# Database
|
||||
db_host => $db_host,
|
||||
@@ -442,8 +456,8 @@ class openstack::controller (
|
||||
network_vlan_ranges => $network_vlan_ranges,
|
||||
ovs_enable_tunneling => $ovs_enable_tunneling,
|
||||
ovs_local_ip => $ovs_local_ip_real,
|
||||
bridge_uplinks => ["${external_bridge_name}:${bridge_interface}"],
|
||||
bridge_mappings => ["${physical_network}:${external_bridge_name}"],
|
||||
bridge_uplinks => $bridge_uplinks_real,
|
||||
bridge_mappings => $bridge_mappings_real,
|
||||
enable_ovs_agent => $enable_ovs_agent,
|
||||
firewall_driver => $firewall_driver,
|
||||
# Database
|
||||
|
@@ -164,7 +164,7 @@ class openstack::quantum (
|
||||
$enable_ovs_agent = false,
|
||||
# OVS settings
|
||||
$tenant_network_type = 'gre',
|
||||
$network_vlan_ranges = 'physnet1:1000:2000',
|
||||
$network_vlan_ranges = undef,
|
||||
$ovs_local_ip = false,
|
||||
$ovs_enable_tunneling = true,
|
||||
$bridge_uplinks = [],
|
||||
|
@@ -31,6 +31,7 @@ describe 'openstack::controller' do
|
||||
:nova_admin_tenant_name => 'services',
|
||||
:nova_admin_user => 'nova',
|
||||
:enabled_apis => 'ec2,osapi_compute,metadata',
|
||||
:physical_network => 'default'
|
||||
}
|
||||
end
|
||||
|
||||
@@ -547,7 +548,8 @@ describe 'openstack::controller' do
|
||||
:bridge_interface => 'eth_27',
|
||||
:internal_address => '10.0.0.3',
|
||||
:quantum_db_password => 'q_db_pass',
|
||||
:metadata_shared_secret => 'secret'
|
||||
:metadata_shared_secret => 'secret',
|
||||
:external_bridge_name => 'br-ex'
|
||||
})
|
||||
end
|
||||
|
||||
@@ -564,7 +566,6 @@ describe 'openstack::controller' do
|
||||
:rabbit_password => 'rabbit_pw',
|
||||
:rabbit_virtual_host => '/',
|
||||
:tenant_network_type => 'gre',
|
||||
:network_vlan_ranges => 'physnet1:1000:2000',
|
||||
:ovs_enable_tunneling => true,
|
||||
:ovs_local_ip => '10.0.0.3',
|
||||
:bridge_uplinks => ["br-ex:eth_27"],
|
||||
|
Reference in New Issue
Block a user