Add request forward message 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-19 15:37:43 +09:00 committed by FUJITA Tomonori
parent 37f59926ae
commit b4e7900360
4 changed files with 53 additions and 1 deletions

View File

@ -2994,6 +2994,26 @@ x() ->
#ofp_bundle_prop_experimenter{
experimenter = 101,
exp_type = 2,
data = <<1:32,2:32>>}]}
data = <<1:32,2:32>>}]},
#ofp_requestforward{
request =
#ofp_message{
version = 5,
type = group_mod,
xid = 0,
body =
#ofp_group_mod{
command = add,
type = all,
group_id = 1,
buckets =
[#ofp_bucket{
weight = 1,
watch_port = 1,
watch_group = 1,
actions =
[#ofp_action_output{
port = 2,
max_len = no_buffer}]}]}}}
],
lists:foldl(fun x:do/2, {5, 0}, List).

View File

@ -0,0 +1,31 @@
{
"OFPRequestForward": {
"request": {
"OFPGroupMod": {
"buckets": [
{
"OFPBucket": {
"actions": [
{
"OFPActionOutput": {
"len": 16,
"max_len": 65535,
"port": 2,
"type": 0
}
}
],
"len": 32,
"watch_group": 1,
"watch_port": 1,
"weight": 1
}
}
],
"command": 0,
"group_id": 1,
"type": 0
}
}
}
}

View File

@ -113,6 +113,7 @@ implemented = {
ofproto_v1_4.OFPT_SET_ASYNC: (False, True),
ofproto_v1_4.OFPT_ROLE_STATUS: (True, False),
ofproto_v1_4.OFPT_TABLE_STATUS: (True, False),
ofproto_v1_4.OFPT_REQUESTFORWARD: (False, True),
ofproto_v1_4.OFPT_BUNDLE_CONTROL: (False, True),
ofproto_v1_4.OFPT_BUNDLE_ADD_MESSAGE: (False, True),
},