summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorShinpei Muraoka <shinpei.muraoka@gmail.com>2016-05-10 14:29:35 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-05-13 22:18:05 +0900
commitdcb1efb8e566f7aa39b45218c6773fc132ba2d8c (patch)
tree757917da6d5a4b906804273965eb4a20ade04102
parente721c181e0a14b45e3974175656f4846c1c207b6 (diff)
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 <shinpei.muraoka@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/unit/lib/ofctl_json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json3
-rw-r--r--ryu/tests/unit/lib/ofctl_json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json3
-rw-r--r--ryu/tests/unit/lib/test_ofctl.py10
-rw-r--r--ryu/tests/unit/ofproto/json/of12/lib-ofctl-ofp_queue_get_config_request.packet.json5
-rw-r--r--ryu/tests/unit/ofproto/json/of13/lib-ofctl-ofp_queue_get_config_request.packet.json5
5 files changed, 26 insertions, 0 deletions
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
@@ -159,6 +159,11 @@ def _add_tests():
'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',
'reply': '3-12-ofp_flow_stats_reply.packet.json'
@@ -263,6 +268,11 @@ def _add_tests():
'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',
'reply': '4-12-ofp_flow_stats_reply.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
+ }
+}