summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-04-25 10:20:12 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-04-25 18:49:33 +0900
commitf6e1fa4c57fa7011838129db0e09755510b89b4b (patch)
tree351972c73a7020111e510ee1731147aca6b3286d
parent9e5e9ce56c3d571b4615de043cf3dee1a110a58a (diff)
tests/integrated: Match on MPLS dl_type for flows with pop MPLS 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 pop MPLS actions are inconsistent if the flow does not match on one of the MPLS dl_types. This patch add such a match for the flow that has a pop MPLS action. Also enable the pop MPLS test, it appears to be supported by Open vSwitch. I noticed this when using Open vSwitch's "make ryu-check" as Open vSwitch enforces action consistency for the set NW 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.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ryu/tests/integrated/test_add_flow_v12_actions.py b/ryu/tests/integrated/test_add_flow_v12_actions.py
index 9fbe47f9..757c5e36 100644
--- a/ryu/tests/integrated/test_add_flow_v12_actions.py
+++ b/ryu/tests/integrated/test_add_flow_v12_actions.py
@@ -145,7 +145,9 @@ class RunTest(tester.TestFlowBase):
self._verify = [dp.ofproto.OFPAT_POP_MPLS,
'ethertype', ethertype]
actions = [dp.ofproto_parser.OFPActionPopMpls(ethertype), ]
- self.add_apply_actions(dp, actions)
+ match = dp.ofproto_parser.OFPMatch()
+ match.set_dl_type(ether.ETH_TYPE_MPLS)
+ self.add_apply_actions(dp, actions, match)
# Test of Set-Filed Actions
def test_action_set_field_dl_dst(self, dp):
@@ -482,7 +484,6 @@ class RunTest(tester.TestFlowBase):
'test_action_copy_ttl_in',
'test_action_copy_ttl_out',
'test_action_dec_mpls_ttl',
- 'test_action_pop_mpls',
'test_action_push_mpls',
'test_action_set_field_mpls_label',
'test_action_set_field_mpls_tc',