diff options
author | Simon Horman <horms@verge.net.au> | 2014-04-25 10:20:08 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-04-25 18:49:26 +0900 |
commit | ec02de8d7a5ffefb52d746c21a1cb637873c570f (patch) | |
tree | 72c39cec011eaddc44f8d0325c5747d54f5e6023 | |
parent | 756521f0b4c9a7bbea73ccc00391f1286596bf3b (diff) |
tests/integrated: Match on VLAN tag for flows which set VLAN tags
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 a set-field action for a VLAN tag 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 set-field action
for a VLAN tag.
I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for set-field actions for
VLAN tags.
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.py | 5 |
1 files changed, 4 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 ad953c45..99cc1d78 100644 --- a/ryu/tests/integrated/test_add_flow_v12_actions.py +++ b/ryu/tests/integrated/test_add_flow_v12_actions.py @@ -172,7 +172,10 @@ class RunTest(tester.TestFlowBase): field = dp.ofproto.OXM_OF_VLAN_VID value = 0x1e4 - self.add_set_field_action(dp, field, value) + match = dp.ofproto_parser.OFPMatch() + match.set_vlan_vid(1) + + self.add_set_field_action(dp, field, value, match) def test_action_set_field_vlan_pcp(self, dp): field = dp.ofproto.OXM_OF_VLAN_PCP |