of14: Add optical property to port stats reply unit test

Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
Simon Horman 2014-02-27 17:56:11 +09:00 committed by FUJITA Tomonori
parent 3634f3c652
commit 8caa002953
3 changed files with 31 additions and 2 deletions

View File

@ -543,7 +543,19 @@ x() ->
properties =
[#ofp_port_stats_prop_ethernet{
rx_frame_err = 0,rx_over_err = 0,
rx_crc_err = 0,collisions = 0}]},
rx_crc_err = 0,collisions = 0},
#ofp_port_stats_prop_optical{
flags = [rx_tune,tx_tune],
tx_freq_lmda = 1500,
tx_offset = 700,
tx_grid_span = 500,
rx_freq_lmda = 1500,
rx_offset = 700,
rx_grid_span = 500,
tx_pwr = 2000,
rx_pwr = 2000,
bias_current = 300,
temperature = 273}]},
#ofp_port_stats{
port_no = 6,rx_packets = 4,tx_packets = 4,rx_bytes = 336,
tx_bytes = 336,rx_dropped = 0,tx_dropped = 0,

View File

@ -5,7 +5,7 @@
"OFPPortStats": {
"duration_nsec": 0,
"duration_sec": 0,
"length": 120,
"length": 168,
"port_no": 7,
"properties": [
{
@ -17,6 +17,23 @@
"rx_over_err": 0,
"type": 0
}
},
{
"OFPPortStatsPropOptical": {
"bias_current": 300,
"tx_freq_lmda": 1500,
"temperature": 273,
"rx_freq_lmda": 1500,
"tx_pwr": 2000,
"length": 44,
"flags": 3,
"rx_offset": 700,
"rx_grid_span": 500,
"rx_pwr": 2000,
"tx_offset": 700,
"type": 1,
"tx_grid_span": 500
}
}
],
"rx_bytes": 0,