From dcb1efb8e566f7aa39b45218c6773fc132ba2d8c Mon Sep 17 00:00:00 2001 From: Shinpei Muraoka Date: Tue, 10 May 2016 14:29:35 +0900 Subject: test_ofctl: Test cases for omitting port_no in get_queue_config Add test cases of specify the port number for get queues config. Signed-off-by: Shinpei Muraoka Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- .../of12/lib-ofctl-ofp_queue_get_config_request.packet.json | 3 +++ .../of13/lib-ofctl-ofp_queue_get_config_request.packet.json | 3 +++ ryu/tests/unit/lib/test_ofctl.py | 10 ++++++++++ .../of12/lib-ofctl-ofp_queue_get_config_request.packet.json | 5 +++++ .../of13/lib-ofctl-ofp_queue_get_config_request.packet.json | 5 +++++ 5 files changed, 26 insertions(+) create mode 100644 ryu/tests/unit/lib/ofctl_json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json create mode 100644 ryu/tests/unit/lib/ofctl_json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json create mode 100644 ryu/tests/unit/ofproto/json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json create mode 100644 ryu/tests/unit/ofproto/json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json diff --git a/ryu/tests/unit/lib/ofctl_json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json b/ryu/tests/unit/lib/ofctl_json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json new file mode 100644 index 00000000..e116fdc1 --- /dev/null +++ b/ryu/tests/unit/lib/ofctl_json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json @@ -0,0 +1,3 @@ +{ + "port": null +} diff --git a/ryu/tests/unit/lib/ofctl_json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json b/ryu/tests/unit/lib/ofctl_json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json new file mode 100644 index 00000000..e116fdc1 --- /dev/null +++ b/ryu/tests/unit/lib/ofctl_json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json @@ -0,0 +1,3 @@ +{ + "port": null +} diff --git a/ryu/tests/unit/lib/test_ofctl.py b/ryu/tests/unit/lib/test_ofctl.py index 3102e1f0..9162015e 100644 --- a/ryu/tests/unit/lib/test_ofctl.py +++ b/ryu/tests/unit/lib/test_ofctl.py @@ -158,6 +158,11 @@ def _add_tests(): 'request': '3-35-ofp_queue_get_config_request.packet.json', 'reply': '3-36-ofp_queue_get_config_reply.packet.json' }, + { + 'method': ofctl_v1_2.get_queue_config, + 'request': 'lib-ofctl-ofp_queue_get_config_request.packet.json', + 'reply': '3-36-ofp_queue_get_config_reply.packet.json' + }, { 'method': ofctl_v1_2.get_flow_stats, 'request': '3-11-ofp_flow_stats_request.packet.json', @@ -262,6 +267,11 @@ def _add_tests(): 'request': '4-35-ofp_queue_get_config_request.packet.json', 'reply': '4-36-ofp_queue_get_config_reply.packet.json' }, + { + 'method': ofctl_v1_3.get_queue_config, + 'request': 'lib-ofctl-ofp_queue_get_config_request.packet.json', + 'reply': '4-36-ofp_queue_get_config_reply.packet.json' + }, { 'method': ofctl_v1_3.get_flow_stats, 'request': '4-11-ofp_flow_stats_request.packet.json', diff --git a/ryu/tests/unit/ofproto/json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json b/ryu/tests/unit/ofproto/json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json new file mode 100644 index 00000000..a50308c0 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json @@ -0,0 +1,5 @@ +{ + "OFPQueueGetConfigRequest": { + "port": 4294967295 + } +} diff --git a/ryu/tests/unit/ofproto/json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json b/ryu/tests/unit/ofproto/json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json new file mode 100644 index 00000000..a50308c0 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json @@ -0,0 +1,5 @@ +{ + "OFPQueueGetConfigRequest": { + "port": 4294967295 + } +} -- cgit v1.2.3