From d736b830b966c349489fa4079cbac05284abcedc Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Tue, 22 Dec 2015 11:49:23 +0900 Subject: lib/ofctl: Add test cases for ofctl_v1_0 TODO: Add test cases for the other messages after adding test cases for ofproto/test_parser. Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- .../ofctl_json/of10/1-2-ofp_flow_mod.packet.json | 23 ++++++++++++++++++++++ ryu/tests/unit/lib/test_ofctl.py | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 ryu/tests/unit/lib/ofctl_json/of10/1-2-ofp_flow_mod.packet.json diff --git a/ryu/tests/unit/lib/ofctl_json/of10/1-2-ofp_flow_mod.packet.json b/ryu/tests/unit/lib/ofctl_json/of10/1-2-ofp_flow_mod.packet.json new file mode 100644 index 00000000..cc0b13d9 --- /dev/null +++ b/ryu/tests/unit/lib/ofctl_json/of10/1-2-ofp_flow_mod.packet.json @@ -0,0 +1,23 @@ +{ + "cmd": 0, + "flow": { + "actions": [ + { + "type": "OUTPUT", + "max_len": 65535, + "port": 6 + } + ], + "buffer_id": 65535, + "command": 0, + "cookie": 0, + "flags": 0, + "hard_timeout": 0, + "idle_timeout": 0, + "match": { + "dl_dst": "f2:0b:a4:7d:f8:ea" + }, + "out_port": 65532, + "priority": 123 + } +} diff --git a/ryu/tests/unit/lib/test_ofctl.py b/ryu/tests/unit/lib/test_ofctl.py index 949a548c..adb2719f 100644 --- a/ryu/tests/unit/lib/test_ofctl.py +++ b/ryu/tests/unit/lib/test_ofctl.py @@ -111,6 +111,13 @@ def _add_tests(): } _test_cases = { + 'of10': [ + { + 'method': ofctl_v1_0.mod_flow_entry, + 'request': '1-2-ofp_flow_mod.packet.json', + 'reply': None + }, + ], 'of12': [ { 'method': ofctl_v1_2.get_desc_stats, -- cgit v1.2.3