From 9719958863c3ff9092dcc5ddb6b209b161c1579c Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 27 Feb 2014 17:56:18 +0900 Subject: [PATCH] of14: Add experimenter property to port mod reply unit test Signed-off-by: Simon Horman --- .../packet_data/of14/5-22-ofp_port_mod.packet | Bin 64 -> 120 bytes ryu/tests/packet_data_generator/src/x5.erl | 14 ++++++++- .../json/of14/5-22-ofp_port_mod.packet.json | 27 ++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ryu/tests/packet_data/of14/5-22-ofp_port_mod.packet b/ryu/tests/packet_data/of14/5-22-ofp_port_mod.packet index 9fb56651cef802300d116b76340cd6db55074619..2f733044a6220e11057576a1b8b170be5eaecf7d 100644 GIT binary patch delta 67 wcmZ>$U||(tsF=uNWAXn#0}lfOLn;u10gx{MWPtdLAPnS-K>18iF%ZoF0I9nPvj6}9 delta 10 Rcmb<$U||(taG1zq0{{w?0pkDw diff --git a/ryu/tests/packet_data_generator/src/x5.erl b/ryu/tests/packet_data_generator/src/x5.erl index 6918ba35..dbe9ee06 100644 --- a/ryu/tests/packet_data_generator/src/x5.erl +++ b/ryu/tests/packet_data_generator/src/x5.erl @@ -497,7 +497,19 @@ x() -> freq_lmda = 1500, fl_offset = 2000, grid_span = 3000, - tx_pwr = 300}]}, + tx_pwr = 300}, + #ofp_port_mod_prop_experimenter{ + experimenter = 101, + exp_type = 0, + data = <<>>}, + #ofp_port_mod_prop_experimenter{ + experimenter = 101, + exp_type = 1, + data = <<1:32>>}, + #ofp_port_mod_prop_experimenter{ + experimenter = 101, + exp_type = 2, + data = <<1:32,2:32>>}]}, #ofp_table_mod{ properties = [#ofp_table_mod_prop_eviction{flags = []}, diff --git a/ryu/tests/unit/ofproto/json/of14/5-22-ofp_port_mod.packet.json b/ryu/tests/unit/ofproto/json/of14/5-22-ofp_port_mod.packet.json index 1aa57127..4489d5e1 100644 --- a/ryu/tests/unit/ofproto/json/of14/5-22-ofp_port_mod.packet.json +++ b/ryu/tests/unit/ofproto/json/of14/5-22-ofp_port_mod.packet.json @@ -21,6 +21,33 @@ "grid_span": 3000, "tx_pwr": 300 } + }, + { + "OFPPortModPropExperimenter": { + "length": 12, + "type": 65535, + "exp_type": 0, + "experimenter": 101, + "data": [] + } + }, + { + "OFPPortModPropExperimenter": { + "length": 16, + "type": 65535, + "exp_type": 1, + "experimenter": 101, + "data": [1] + } + }, + { + "OFPPortModPropExperimenter": { + "length": 20, + "type": 65535, + "exp_type": 2, + "experimenter": 101, + "data": [1, 2] + } } ], "port_no": 1