diff options
author | Simon Horman <horms@verge.net.au> | 2014-02-26 16:26:12 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-02-27 13:59:40 +0900 |
commit | 808a1bfdf78e6582f2fa1097ba71c637042583cf (patch) | |
tree | 2f0445f19740f534ae4f1224c9fdabfec703aa23 | |
parent | 49079b4c8efd35ca56cfae54160ff5e024776b9d (diff) |
of14: Add experimenter property to queue stats reply unit test
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/tests/packet_data/of14/5-36-ofp_queue_stats_reply.packet | bin | 160 -> 216 bytes | |||
-rw-r--r-- | ryu/tests/packet_data_generator/src/x5.erl | 15 | ||||
-rw-r--r-- | ryu/tests/unit/ofproto/json/of14/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 Binary files differindex 1e631cc0..c0a5dd8c 100644 --- 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 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, |