diff options
author | Simon Horman <horms@verge.net.au> | 2014-04-24 09:39:32 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-04-24 23:09:17 +0900 |
commit | 9664f3b9e37cc6aaf1ab3464718d92eb1faf6b79 (patch) | |
tree | 2f635fa9761905e9ba18ea8eef7687eeaf0e1067 | |
parent | 66759d76ddb74e3ea0ea03ddc8b6f81b70178528 (diff) |
tests/integrated: Specify table_id for flow_mod modify tests
Use actual table ids rather than OFPTT_ALL for
flow_mod modify tests as OpenFlow 1.2 section A3.4.1
stipulates that OFPTT_ALL is only valid for flow_mod delete requests.
I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces the above stipulation.
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_request_reply_v12.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ryu/tests/integrated/test_request_reply_v12.py b/ryu/tests/integrated/test_request_reply_v12.py index e3223e6b..125cc9f5 100644 --- a/ryu/tests/integrated/test_request_reply_v12.py +++ b/ryu/tests/integrated/test_request_reply_v12.py @@ -506,8 +506,9 @@ class RunTest(tester.TestFlowBase): cookie = 0xff00 cookie_mask = 0xffff + table_id = 1 self.mod_flow(dp, command=dp.ofproto.OFPFC_MODIFY, - actions=[action], table_id=dp.ofproto.OFPTT_ALL, + actions=[action], table_id=table_id, cookie=cookie, cookie_mask=cookie_mask) dp.send_barrier() @@ -526,9 +527,10 @@ class RunTest(tester.TestFlowBase): cookie = 0xffff cookie_mask = 0xff00 - self.mod_flow(dp, command=dp.ofproto.OFPFC_MODIFY, - actions=[action], table_id=dp.ofproto.OFPTT_ALL, - cookie=cookie, cookie_mask=cookie_mask) + for table_id in range(2): + self.mod_flow(dp, command=dp.ofproto.OFPFC_MODIFY, + actions=[action], table_id=table_id, + cookie=cookie, cookie_mask=cookie_mask) dp.send_barrier() self.send_flow_stats(dp) @@ -545,9 +547,9 @@ class RunTest(tester.TestFlowBase): match = dp.ofproto_parser.OFPMatch() match.set_dl_dst('\xff' * 6) + table_id=3 self.mod_flow(dp, command=dp.ofproto.OFPFC_MODIFY, - actions=[action], table_id=dp.ofproto.OFPTT_ALL, - match=match) + actions=[action], table_id=table_id, match=match) dp.send_barrier() self.send_flow_stats(dp) @@ -565,8 +567,9 @@ class RunTest(tester.TestFlowBase): match = dp.ofproto_parser.OFPMatch() match.set_dl_dst('\xee' * 6) priority = 100 + table_id=2 self.mod_flow(dp, command=dp.ofproto.OFPFC_MODIFY_STRICT, - actions=[action], table_id=dp.ofproto.OFPTT_ALL, + actions=[action], table_id=table_id, match=match, priority=priority) dp.send_barrier() |