diff options
author | Simon Horman <horms@verge.net.au> | 2014-03-19 15:37:41 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-03-21 20:43:10 +0900 |
commit | 9128082fae23e55412afcdd42aaf776241970efc (patch) | |
tree | 96756325060160627ec3af30fb822fe97ef249d7 | |
parent | 7938d73f57d0474ba8539cec924fdb715b5a96cc (diff) |
of14: Add bundle add message 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-70-ofp_bundle_add_msg.packet | bin | 0 -> 80 bytes | |||
-rw-r--r-- | ryu/tests/packet_data_generator/src/x5.erl | 22 | ||||
-rw-r--r-- | ryu/tests/unit/ofproto/json/of14/5-70-ofp_bundle_add_msg.packet.json | 40 | ||||
-rw-r--r-- | ryu/tests/unit/ofproto/test_parser.py | 1 |
4 files changed, 63 insertions, 0 deletions
diff --git a/ryu/tests/packet_data/of14/5-70-ofp_bundle_add_msg.packet b/ryu/tests/packet_data/of14/5-70-ofp_bundle_add_msg.packet Binary files differnew file mode 100644 index 00000000..5565f8d3 --- /dev/null +++ b/ryu/tests/packet_data/of14/5-70-ofp_bundle_add_msg.packet diff --git a/ryu/tests/packet_data_generator/src/x5.erl b/ryu/tests/packet_data_generator/src/x5.erl index aafb37f6..760d11b7 100644 --- a/ryu/tests/packet_data_generator/src/x5.erl +++ b/ryu/tests/packet_data_generator/src/x5.erl @@ -2972,6 +2972,28 @@ x() -> #ofp_bundle_prop_experimenter{ experimenter = 101, exp_type = 2, + data = <<1:32,2:32>>}]}, + #ofp_bundle_add_msg{ + bundle_id = 1234, + flags = [atomic], + message = + #ofp_message{ + version = 5, + type = echo_request, + xid = 0, + body = #ofp_echo_request{}}, + properties = + [#ofp_bundle_prop_experimenter{ + experimenter = 101, + exp_type = 0, + data = <<>>}, + #ofp_bundle_prop_experimenter{ + experimenter = 101, + exp_type = 1, + data = <<1:32>>}, + #ofp_bundle_prop_experimenter{ + experimenter = 101, + exp_type = 2, data = <<1:32,2:32>>}]} ], lists:foldl(fun x:do/2, {5, 0}, List). diff --git a/ryu/tests/unit/ofproto/json/of14/5-70-ofp_bundle_add_msg.packet.json b/ryu/tests/unit/ofproto/json/of14/5-70-ofp_bundle_add_msg.packet.json new file mode 100644 index 00000000..3c267599 --- /dev/null +++ b/ryu/tests/unit/ofproto/json/of14/5-70-ofp_bundle_add_msg.packet.json @@ -0,0 +1,40 @@ +{ + "OFPBundleAddMsg": { + "bundle_id": 1234, + "flags": 1, + "message": { + "OFPEchoRequest": { + "data": null + } + }, + "properties": [ + { + "OFPBundlePropExperimenter": { + "data": "", + "exp_type": 0, + "experimenter": 101, + "length": 12, + "type": 65535 + } + }, + { + "OFPBundlePropExperimenter": { + "data": "AAAAAQ==", + "exp_type": 1, + "experimenter": 101, + "length": 16, + "type": 65535 + } + }, + { + "OFPBundlePropExperimenter": { + "data": "AAAAAQAAAAI=", + "exp_type": 2, + "experimenter": 101, + "length": 20, + "type": 65535 + } + } + ] + } +} diff --git a/ryu/tests/unit/ofproto/test_parser.py b/ryu/tests/unit/ofproto/test_parser.py index d07bf9dd..fdcb328f 100644 --- a/ryu/tests/unit/ofproto/test_parser.py +++ b/ryu/tests/unit/ofproto/test_parser.py @@ -114,6 +114,7 @@ implemented = { ofproto_v1_4.OFPT_ROLE_STATUS: (True, False), ofproto_v1_4.OFPT_TABLE_STATUS: (True, False), ofproto_v1_4.OFPT_BUNDLE_CONTROL: (False, True), + ofproto_v1_4.OFPT_BUNDLE_ADD_MESSAGE: (False, True), }, } |