summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYusuke Iwase <iwase.yusuke0@gmail.com>2015-08-19 11:07:59 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-20 18:28:40 +0900
commit0d64e7f890dd479d53ec21a6ab29e7e29992f891 (patch)
tree2ca0c796b1054f00c8d7f52680312b8ededfb084
parent742644a21de25feeb0aeb906674fefa1651c9cff (diff)
test_parser: Add test case for OFPQueuePropExperimenter
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/packet_data/of13/4-36-ofp_queue_get_config_reply.packetbin112 -> 211 bytes
-rw-r--r--ryu/tests/packet_data_generator/src/x4.erl16
-rw-r--r--ryu/tests/unit/ofproto/json/of13/4-36-ofp_queue_get_config_reply.packet.json56
3 files changed, 68 insertions, 4 deletions
diff --git a/ryu/tests/packet_data/of13/4-36-ofp_queue_get_config_reply.packet b/ryu/tests/packet_data/of13/4-36-ofp_queue_get_config_reply.packet
index 18bebb97..898f0b3f 100644
--- a/ryu/tests/packet_data/of13/4-36-ofp_queue_get_config_reply.packet
+++ b/ryu/tests/packet_data/of13/4-36-ofp_queue_get_config_reply.packet
Binary files differ
diff --git a/ryu/tests/packet_data_generator/src/x4.erl b/ryu/tests/packet_data_generator/src/x4.erl
index 0ba1939c..6098b456 100644
--- a/ryu/tests/packet_data_generator/src/x4.erl
+++ b/ryu/tests/packet_data_generator/src/x4.erl
@@ -565,13 +565,25 @@ x() ->
#ofp_packet_queue{queue_id = 99, port_no = 77,
properties = [
#ofp_queue_prop_min_rate{rate = 10},
- #ofp_queue_prop_max_rate{rate = 900}
+ #ofp_queue_prop_max_rate{rate = 900},
+ #ofp_queue_prop_experimenter{experimenter = 999,
+ data = <<>>}
]
},
#ofp_packet_queue{queue_id = 88, port_no = 77,
properties = [
#ofp_queue_prop_min_rate{rate = 100},
- #ofp_queue_prop_max_rate{rate = 200}
+ #ofp_queue_prop_max_rate{rate = 200},
+ #ofp_queue_prop_experimenter{experimenter = 999,
+ data = <<1:8>>}
+ ]
+ },
+ #ofp_packet_queue{queue_id = 77, port_no = 77,
+ properties = [
+ #ofp_queue_prop_min_rate{rate = 200},
+ #ofp_queue_prop_max_rate{rate = 400},
+ #ofp_queue_prop_experimenter{experimenter = 999,
+ data = <<1:8,2:8>>}
]
}
]},
diff --git a/ryu/tests/unit/ofproto/json/of13/4-36-ofp_queue_get_config_reply.packet.json b/ryu/tests/unit/ofproto/json/of13/4-36-ofp_queue_get_config_reply.packet.json
index 7d0a7bbe..ce1f4123 100644
--- a/ryu/tests/unit/ofproto/json/of13/4-36-ofp_queue_get_config_reply.packet.json
+++ b/ryu/tests/unit/ofproto/json/of13/4-36-ofp_queue_get_config_reply.packet.json
@@ -4,7 +4,7 @@
"queues": [
{
"OFPPacketQueue": {
- "len": 48,
+ "len": 64,
"port": 77,
"properties": [
{
@@ -20,6 +20,14 @@
"property": 2,
"rate": 900
}
+ },
+ {
+ "OFPQueuePropExperimenter": {
+ "data": [],
+ "experimenter": 999,
+ "len": 16,
+ "property": 65535
+ }
}
],
"queue_id": 99
@@ -27,7 +35,7 @@
},
{
"OFPPacketQueue": {
- "len": 48,
+ "len": 65,
"port": 77,
"properties": [
{
@@ -43,10 +51,54 @@
"property": 2,
"rate": 200
}
+ },
+ {
+ "OFPQueuePropExperimenter": {
+ "experimenter": 999,
+ "data": [
+ 1
+ ],
+ "len": 17,
+ "property": 65535
+ }
}
],
"queue_id": 88
}
+ },
+ {
+ "OFPPacketQueue": {
+ "len": 66,
+ "port": 77,
+ "properties": [
+ {
+ "OFPQueuePropMinRate": {
+ "len": 16,
+ "property": 1,
+ "rate": 200
+ }
+ },
+ {
+ "OFPQueuePropMaxRate": {
+ "len": 16,
+ "property": 2,
+ "rate": 400
+ }
+ },
+ {
+ "OFPQueuePropExperimenter": {
+ "experimenter": 999,
+ "data": [
+ 1,
+ 2
+ ],
+ "len": 18,
+ "property": 65535
+ }
+ }
+ ],
+ "queue_id": 77
+ }
}
]
}