# License for the specific language governing permissions and limitations
# under the License.
+from oslo_config import cfg
from oslo_log import log as logging
import oslo_messaging
from oslo_utils import excutils
LOG = logging.getLogger(__name__)
+cfg.CONF.import_group('AGENT', 'neutron.plugins.ml2.drivers.openvswitch.'
+ 'agent.common.config')
+
# A class to represent a DVR-hosted subnet including vif_ports resident on
# that subnet
self.dvr_mac_address = None
if self.enable_distributed_routing:
self.get_dvr_mac_address()
+ self.conf = cfg.CONF
def setup_dvr_flows(self):
self.setup_dvr_flows_on_integ_br()
LOG.info(_LI("L2 Agent operating in DVR Mode with MAC %s"),
self.dvr_mac_address)
# Remove existing flows in integration bridge
- self.int_br.delete_flows()
+ if self.conf.AGENT.drop_flows_on_start:
+ self.int_br.delete_flows()
# Add a canary flow to int_br to track OVS restarts
self.int_br.setup_canary_table()
ioport = self.agent.dvr_agent.int_ofports[physical_networks[0]]
expected_on_int_br = [
# setup_dvr_flows_on_integ_br
- mock.call.delete_flows(),
mock.call.setup_canary_table(),
mock.call.install_drop(table_id=constants.DVR_TO_SRC_MAC,
priority=1),