From 808a1bfdf78e6582f2fa1097ba71c637042583cf Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 26 Feb 2014 16:26:12 +0900 Subject: [PATCH] of14: Add experimenter property to queue stats reply unit test Signed-off-by: Simon Horman Signed-off-by: FUJITA Tomonori --- .../of14/5-36-ofp_queue_stats_reply.packet | Bin 160 -> 216 bytes ryu/tests/packet_data_generator/src/x5.erl | 15 +++++++- .../5-36-ofp_queue_stats_reply.packet.json | 32 ++++++++++++++++-- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/ryu/tests/packet_data/of14/5-36-ofp_queue_stats_reply.packet b/ryu/tests/packet_data/of14/5-36-ofp_queue_stats_reply.packet index 1e631cc03088d5d69470c4bf8e0c19a7ce111df7..c0a5dd8c7f5c9a42338e3059c11642ef7c13c888 100644 GIT binary patch literal 216 zcmZP-X1Kus0<2(?fguA*Gcd3NS&VQV4#xlg3_L)oRG2i7F979(^fChZB2YdPh!4ad ant{OpOo9kDASP%Jl6sK4AZCDc;{X63_z5-u literal 160 rcmZP-W>~-g0<2(?fx!SuGcd3NS&VQVE(St98;R;c<}=|k7A6h=vB&{t diff --git a/ryu/tests/packet_data_generator/src/x5.erl b/ryu/tests/packet_data_generator/src/x5.erl index 5d44aa3a..0f1673a8 100644 --- a/ryu/tests/packet_data_generator/src/x5.erl +++ b/ryu/tests/packet_data_generator/src/x5.erl @@ -582,7 +582,20 @@ x() -> body = [#ofp_queue_stats{ port_no = 7,queue_id = 1,tx_bytes = 0,tx_packets = 0, - tx_errors = 0}, + tx_errors = 0, + properties = + [#ofp_queue_stats_prop_experimenter{ + experimenter = 101, + exp_type = 0, + data = <<>>}, + #ofp_queue_stats_prop_experimenter{ + experimenter = 101, + exp_type = 1, + data = <<1:32>>}, + #ofp_queue_stats_prop_experimenter{ + experimenter = 101, + exp_type = 2, + data = <<1:32,2:32>>}]}, #ofp_queue_stats{ port_no = 6,queue_id = 1,tx_bytes = 0,tx_packets = 0, tx_errors = 0}, diff --git a/ryu/tests/unit/ofproto/json/of14/5-36-ofp_queue_stats_reply.packet.json b/ryu/tests/unit/ofproto/json/of14/5-36-ofp_queue_stats_reply.packet.json index 5d92e94a..5fecc669 100644 --- a/ryu/tests/unit/ofproto/json/of14/5-36-ofp_queue_stats_reply.packet.json +++ b/ryu/tests/unit/ofproto/json/of14/5-36-ofp_queue_stats_reply.packet.json @@ -5,9 +5,37 @@ "OFPQueueStats": { "duration_nsec": 0, "duration_sec": 0, - "length": 48, + "length": 104, "port_no": 7, - "properties": [], + "properties": [ + { + "OFPQueueStatsPropExperimenter": { + "length": 12, + "type": 65535, + "exp_type": 0, + "experimenter": 101, + "data": [] + } + }, + { + "OFPQueueStatsPropExperimenter": { + "length": 16, + "type": 65535, + "exp_type": 1, + "experimenter": 101, + "data": [1] + } + }, + { + "OFPQueueStatsPropExperimenter": { + "length": 20, + "type": 65535, + "exp_type": 2, + "experimenter": 101, + "data": [1, 2] + } + } + ], "queue_id": 1, "tx_bytes": 0, "tx_errors": 0,