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>
This commit is contained in:
Simon Horman 2014-03-11 10:42:02 +09:00 committed by FUJITA Tomonori
parent 41c2d623a8
commit dad67544d9
3 changed files with 44 additions and 1 deletions

View File

@ -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).

View File

@ -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
}
}