diff options
author | Simon Horman <horms@verge.net.au> | 2014-02-27 17:56:10 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-02-27 22:29:56 +0900 |
commit | 3634f3c652bd1a77f40f9ff3f8ec38d1373f08e5 (patch) | |
tree | d435fbb614003db17f67a24d794fbadb20faa25a | |
parent | 39b78cc2c7430b4c2f0f18388dbc0e88b0406639 (diff) |
of14: Add experimenter property to port status unit test
Signed-off-by: Simon Horman <horms@verge.net.au>
--
v3
* Correct indentation
v2
* First post
-rw-r--r-- | ryu/tests/packet_data/of14/5-37-ofp_port_status.packet | bin | 128 -> 184 bytes | |||
-rw-r--r-- | ryu/tests/packet_data_generator/src/x5.erl | 14 | ||||
-rw-r--r-- | ryu/tests/unit/ofproto/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 Binary files differindex e8310212..e8c67823 100644 --- a/ryu/tests/packet_data/of14/5-37-ofp_port_status.packet +++ b/ryu/tests/packet_data/of14/5-37-ofp_port_status.packet 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 |