summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-04-25 10:20:07 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-04-25 18:49:26 +0900
commit756521f0b4c9a7bbea73ccc00391f1286596bf3b (patch)
tree74a2ae8e5edfa60d071ac4aada869e027b578478
parent47856c381cb02b8b07942040aeaf09321e58d490 (diff)
tests/integrated: Match on VLAN tag for flows with pop VLAN TTL actions
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow as an action whose operation is inconsistent with the flows match. In terms of the above the pop ttl action is considered inconsistent if it the flow does not match on a VLAN tag. This patch add such a match for the flow that has a pop VLAN action. I noticed this when using Open vSwitch's "make ryu-check" as Open vSwitch enforces action consistency for the pop VLAN TTL action. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/integrated/test_add_flow_v12_actions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ryu/tests/integrated/test_add_flow_v12_actions.py b/ryu/tests/integrated/test_add_flow_v12_actions.py
index 2f0c7f73..ad953c45 100644
--- a/ryu/tests/integrated/test_add_flow_v12_actions.py
+++ b/ryu/tests/integrated/test_add_flow_v12_actions.py
@@ -128,7 +128,9 @@ class RunTest(tester.TestFlowBase):
self._verify = [dp.ofproto.OFPAT_POP_VLAN, ]
actions = [dp.ofproto_parser.OFPActionPopVlan(), ]
- self.add_apply_actions(dp, actions)
+ match = dp.ofproto_parser.OFPMatch()
+ match.set_vlan_vid(1)
+ self.add_apply_actions(dp, actions, match)
def test_action_push_mpls(self, dp):
ethertype = ether.ETH_TYPE_MPLS