diff options
author | Simon Horman <horms@verge.net.au> | 2014-02-27 17:56:18 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-02-27 22:30:08 +0900 |
commit | 9719958863c3ff9092dcc5ddb6b209b161c1579c (patch) | |
tree | cd6dedcdeead9ae780b1dd8f4fc1ceb615171e9f | |
parent | 974e4030c30a5bd05cc27d1acb1832f8eaa5e6f4 (diff) |
of14: Add experimenter property to port mod reply unit test
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | ryu/tests/packet_data/of14/5-22-ofp_port_mod.packet | bin | 64 -> 120 bytes | |||
-rw-r--r-- | ryu/tests/packet_data_generator/src/x5.erl | 14 | ||||
-rw-r--r-- | ryu/tests/unit/ofproto/json/of14/5-22-ofp_port_mod.packet.json | 27 |
3 files changed, 40 insertions, 1 deletions
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 Binary files differindex 9fb56651..2f733044 100644 --- a/ryu/tests/packet_data/of14/5-22-ofp_port_mod.packet +++ b/ryu/tests/packet_data/of14/5-22-ofp_port_mod.packet 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 |