From 0d64e7f890dd479d53ec21a6ab29e7e29992f891 Mon Sep 17 00:00:00 2001 From: Yusuke Iwase Date: Wed, 19 Aug 2015 11:07:59 +0900 Subject: [PATCH] test_parser: Add test case for OFPQueuePropExperimenter Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- .../4-36-ofp_queue_get_config_reply.packet | Bin 112 -> 211 bytes ryu/tests/packet_data_generator/src/x4.erl | 16 ++++- ...-36-ofp_queue_get_config_reply.packet.json | 56 +++++++++++++++++- 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 18bebb971a4885043e5ada46d420af829b4dba3b..898f0b3fa0afc2c899d27b17a39b274beac47a54 100644 GIT binary patch literal 211 zcmX|5u?>JQ40Bp0CSc(mVDHWjr*Hsgv2z4xfLo_nN^LiBlxD;Y;w3T@8!KVTk}!0I z+wuZIJ|6N+sgL;h#7a(>-PQc=-t)NRneU~PH=0yx(f5CV2kHTKs?P<3lrIP$8c`Gr literal 112 zcmZP(XDDC*g8x7OqJbb8heiwnwUg7BGJpnL{~2p|hneG002h7%Az E0D%q&KmY&$ 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 + } } ] }