Merge "Change the order of installing flows for br-int"
This commit is contained in:
@@ -40,8 +40,8 @@ class OVSIntegrationBridge(ovs_bridge.OVSAgentBridge):
|
||||
"""openvswitch agent br-int specific logic."""
|
||||
|
||||
def setup_default_table(self):
|
||||
self.install_normal()
|
||||
self.setup_canary_table()
|
||||
self.install_normal()
|
||||
self.install_drop(table_id=constants.ARP_SPOOF_TABLE)
|
||||
|
||||
def setup_canary_table(self):
|
||||
|
||||
@@ -34,8 +34,8 @@ class OVSIntegrationBridge(ovs_bridge.OVSAgentBridge):
|
||||
"""openvswitch agent br-int specific logic."""
|
||||
|
||||
def setup_default_table(self):
|
||||
self.install_normal()
|
||||
self.setup_canary_table()
|
||||
self.install_normal()
|
||||
self.install_drop(table_id=constants.ARP_SPOOF_TABLE)
|
||||
|
||||
def setup_canary_table(self):
|
||||
|
||||
@@ -33,6 +33,12 @@ class OVSIntegrationBridgeTest(ovs_bridge_test_base.OVSBridgeTestBase):
|
||||
self.br.setup_default_table()
|
||||
(dp, ofp, ofpp) = self._get_dp()
|
||||
expected = [
|
||||
call._send_msg(ofpp.OFPFlowMod(dp,
|
||||
cookie=self.stamp,
|
||||
instructions=[],
|
||||
match=ofpp.OFPMatch(),
|
||||
priority=0,
|
||||
table_id=23)),
|
||||
call._send_msg(ofpp.OFPFlowMod(dp,
|
||||
cookie=self.stamp,
|
||||
instructions=[
|
||||
@@ -44,12 +50,6 @@ class OVSIntegrationBridgeTest(ovs_bridge_test_base.OVSBridgeTestBase):
|
||||
match=ofpp.OFPMatch(),
|
||||
priority=0,
|
||||
table_id=0)),
|
||||
call._send_msg(ofpp.OFPFlowMod(dp,
|
||||
cookie=self.stamp,
|
||||
instructions=[],
|
||||
match=ofpp.OFPMatch(),
|
||||
priority=0,
|
||||
table_id=23)),
|
||||
call._send_msg(ofpp.OFPFlowMod(dp,
|
||||
cookie=self.stamp,
|
||||
instructions=[],
|
||||
|
||||
@@ -33,8 +33,8 @@ class OVSIntegrationBridgeTest(ovs_bridge_test_base.OVSBridgeTestBase):
|
||||
def test_setup_default_table(self):
|
||||
self.br.setup_default_table()
|
||||
expected = [
|
||||
call.add_flow(priority=0, table=0, actions='normal'),
|
||||
call.add_flow(priority=0, table=23, actions='drop'),
|
||||
call.add_flow(priority=0, table=0, actions='normal'),
|
||||
call.add_flow(priority=0, table=24, actions='drop'),
|
||||
]
|
||||
self.assertEqual(expected, self.mock.mock_calls)
|
||||
|
||||
Reference in New Issue
Block a user