Browse code

Define PUBLIC_BRIDGE in the main Neutron lib

This way, it can be used by both OVS and Linux Bridge

Change-Id: Iea5a8bb720d327b69f64791a23d414d4cde2e3ea
Closes-Bug: #1460758

Sean M. Collins authored on 2015/06/02 03:13:41
Showing 3 changed files
... ...
@@ -168,6 +168,10 @@ NEUTRON_CREATE_INITIAL_NETWORKS=${NEUTRON_CREATE_INITIAL_NETWORKS:-True}
168 168
 ## Provider Network Information
169 169
 PROVIDER_SUBNET_NAME=${PROVIDER_SUBNET_NAME:-"provider_net"}
170 170
 
171
+# Define the public bridge that will transmit traffic from VMs to the
172
+# physical network - used by both the OVS and Linux Bridge drivers.
173
+PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
174
+
171 175
 # Use flat providernet for public network
172 176
 #
173 177
 # If Q_USE_PROVIDERNET_FOR_PUBLIC=True, use a flat provider network
... ...
@@ -7,6 +7,10 @@
7 7
 PLUGIN_XTRACE=$(set +o | grep xtrace)
8 8
 set +o xtrace
9 9
 
10
+function neutron_lb_cleanup {
11
+    sudo brctl delbr $PUBLIC_BRIDGE
12
+}
13
+
10 14
 function is_neutron_ovs_base_plugin {
11 15
     # linuxbridge doesn't use OVS
12 16
     return 1
... ...
@@ -29,6 +33,7 @@ function neutron_plugin_configure_dhcp_agent {
29 29
 }
30 30
 
31 31
 function neutron_plugin_configure_l3_agent {
32
+    sudo brctl addbr $PUBLIC_BRIDGE
32 33
     iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge
33 34
     iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
34 35
 }
... ...
@@ -8,7 +8,6 @@ OVSB_XTRACE=$(set +o | grep xtrace)
8 8
 set +o xtrace
9 9
 
10 10
 OVS_BRIDGE=${OVS_BRIDGE:-br-int}
11
-PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
12 11
 OVS_DATAPATH_TYPE=${OVS_DATAPATH_TYPE:-""}
13 12
 
14 13
 function is_neutron_ovs_base_plugin {