From 3634f3c652bd1a77f40f9ff3f8ec38d1373f08e5 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 27 Feb 2014 17:56:10 +0900 Subject: of14: Add experimenter property to port status unit test Signed-off-by: Simon Horman -- v3 * Correct indentation v2 * First post --- .../packet_data/of14/5-37-ofp_port_status.packet | Bin 128 -> 184 bytes ryu/tests/packet_data_generator/src/x5.erl | 14 +++++++++- .../json/of14/5-37-ofp_port_status.packet.json | 29 ++++++++++++++++++++- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/ryu/tests/packet_data/of14/5-37-ofp_port_status.packet b/ryu/tests/packet_data/of14/5-37-ofp_port_status.packet index e8310212..e8c67823 100644 Binary files a/ryu/tests/packet_data/of14/5-37-ofp_port_status.packet and b/ryu/tests/packet_data/of14/5-37-ofp_port_status.packet differ diff --git a/ryu/tests/packet_data_generator/src/x5.erl b/ryu/tests/packet_data_generator/src/x5.erl index 0f1673a8..de0b3e00 100644 --- a/ryu/tests/packet_data_generator/src/x5.erl +++ b/ryu/tests/packet_data_generator/src/x5.erl @@ -625,7 +625,19 @@ x() -> rx_max_freq_lmda = 2000, rx_grid_freq_lmda = 1500, tx_pwr_min = 1000, - tx_pwr_max = 2000}]} + tx_pwr_max = 2000}, + #ofp_port_desc_prop_experimenter{ + experimenter = 101, + exp_type = 0, + data = <<>>}, + #ofp_port_desc_prop_experimenter{ + experimenter = 101, + exp_type = 1, + data = <<1:32>>}, + #ofp_port_desc_prop_experimenter{ + experimenter = 101, + exp_type = 2, + data = <<1:32,2:32>>}]} }, #ofp_flow_removed{ cookie = <<0,0,0,0,0,0,0,0>>, diff --git a/ryu/tests/unit/ofproto/json/of14/5-37-ofp_port_status.packet.json b/ryu/tests/unit/ofproto/json/of14/5-37-ofp_port_status.packet.json index 8897dcfe..129ee211 100644 --- a/ryu/tests/unit/ofproto/json/of14/5-37-ofp_port_status.packet.json +++ b/ryu/tests/unit/ofproto/json/of14/5-37-ofp_port_status.packet.json @@ -4,7 +4,7 @@ "OFPPort": { "config": 0, "hw_addr": "f2:0b:a4:d0:3f:70", - "length": 112, + "length": 168, "name": "\u79c1\u306e\u30dd\u30fc\u30c8", "port_no": 7, "properties": [ @@ -34,6 +34,33 @@ "tx_pwr_max": 2000, "tx_pwr_min": 1000 } + }, + { + "OFPPortDescPropExperimenter": { + "length": 12, + "type": 65535, + "exp_type": 0, + "experimenter": 101, + "data": [] + } + }, + { + "OFPPortDescPropExperimenter": { + "length": 16, + "type": 65535, + "exp_type": 1, + "experimenter": 101, + "data": [1] + } + }, + { + "OFPPortDescPropExperimenter": { + "length": 20, + "type": 65535, + "exp_type": 2, + "experimenter": 101, + "data": [1, 2] + } } ], "state": 4 -- cgit v1.2.3