summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2014-03-11 10:42:02 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-03-16 21:42:20 +0900
commitdad67544d9bbef085409f3d8a8528c777a48f263 (patch)
tree64c10fc9d584cc1aedecead86430de238b448f3e
parent41c2d623a8ca6b920b863246581421956ddb5e8c (diff)
of14: Add flow monitor request 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-66-ofp_flow_monitor_request.packetbin0 -> 48 bytes
-rw-r--r--ryu/tests/packet_data_generator/src/x5.erl18
-rw-r--r--ryu/tests/unit/ofproto/json/of14/5-66-ofp_flow_monitor_request.packet.json27
3 files changed, 44 insertions, 1 deletions
diff --git a/ryu/tests/packet_data/of14/5-66-ofp_flow_monitor_request.packet b/ryu/tests/packet_data/of14/5-66-ofp_flow_monitor_request.packet
new file mode 100644
index 00000000..1f8d8598
--- /dev/null
+++ b/ryu/tests/packet_data/of14/5-66-ofp_flow_monitor_request.packet
Binary files differ
diff --git a/ryu/tests/packet_data_generator/src/x5.erl b/ryu/tests/packet_data_generator/src/x5.erl
index dbe9ee06..53e85ab6 100644
--- a/ryu/tests/packet_data_generator/src/x5.erl
+++ b/ryu/tests/packet_data_generator/src/x5.erl
@@ -2798,6 +2798,22 @@ x() ->
#ofp_role_prop_experimenter{
experimenter = 101,
exp_type = 2,
- data = <<1:32,2:32>>}]}
+ data = <<1:32,2:32>>}]},
+ #ofp_flow_monitor_request{
+ flags = [],
+ monitor_id = 100000000,
+ out_port = 22,
+ out_group = any,
+ monitor_flags = [initial, add, removed, modify],
+ table_id = 33,
+ command = add,
+ match =
+ #ofp_match{
+ fields =
+ [#ofp_field{
+ class = openflow_basic,name = eth_dst,
+ has_mask = false,
+ value = <<"\362\v\244}\370\352">>,
+ mask = undefined}]}}
],
lists:foldl(fun x:do/2, {5, 0}, List).
diff --git a/ryu/tests/unit/ofproto/json/of14/5-66-ofp_flow_monitor_request.packet.json b/ryu/tests/unit/ofproto/json/of14/5-66-ofp_flow_monitor_request.packet.json
new file mode 100644
index 00000000..aed7ddaa
--- /dev/null
+++ b/ryu/tests/unit/ofproto/json/of14/5-66-ofp_flow_monitor_request.packet.json
@@ -0,0 +1,27 @@
+{
+ "OFPFlowMonitorRequest": {
+ "command": 0,
+ "flags": 0,
+ "match": {
+ "OFPMatch": {
+ "length": 14,
+ "oxm_fields": [
+ {
+ "OXMTlv": {
+ "field": "eth_dst",
+ "mask": null,
+ "value": "f2:0b:a4:7d:f8:ea"
+ }
+ }
+ ],
+ "type": 1
+ }
+ },
+ "monitor_flags": 15,
+ "monitor_id": 100000000,
+ "out_group": 4294967295,
+ "out_port": 22,
+ "table_id": 33,
+ "type": 16
+ }
+}