Formatted

This commit is contained in:
Eishun Kondoh 2018-01-30 22:47:31 +09:00
parent 5fc01a9bec
commit 7635272fbd
150 changed files with 5055 additions and 4032 deletions

View file

@ -6,13 +6,13 @@ defmodule OfpFlowRemovedTest do
test "with OFP_FLOW_REMOVED packet(with a match field)" do
{:ok, flow_removed, ""} =
"test/packet_data/4-40-ofp_flow_removed.packet"
|> File.read!
|> Openflow.read
|> File.read!()
|> Openflow.read()
assert flow_removed.version == 4
assert flow_removed.xid == 0
assert flow_removed.cookie == 0
assert flow_removed.priority == 0xffff
assert flow_removed.priority == 0xFFFF
assert flow_removed.reason == :idle_timeout
assert flow_removed.table_id == 0
assert flow_removed.duration_sec == 3
@ -27,12 +27,12 @@ defmodule OfpFlowRemovedTest do
test "with OFP_FLOW_REMOVED packet(with match fields)" do
{:ok, flow_removed, ""} =
"test/packet_data/libofproto-OFP13-flow_removed.packet"
|> File.read!
|> Openflow.read
|> File.read!()
|> Openflow.read()
assert flow_removed.version == 4
assert flow_removed.xid == 0
assert flow_removed.cookie == 0x123456789abcdef0
assert flow_removed.cookie == 0x123456789ABCDEF0
assert flow_removed.priority == 100
assert flow_removed.reason == :idle_timeout
assert flow_removed.table_id == 1
@ -42,16 +42,17 @@ defmodule OfpFlowRemovedTest do
assert flow_removed.hard_timeout == 300
assert flow_removed.packet_count == 200
assert flow_removed.byte_count == 100
assert flow_removed.match == [
in_port: 43_981,
eth_dst: "aabbcc998877",
eth_type: 2048,
vlan_vid: 5095,
ipv4_dst: {192, 168, 2, 1},
tunnel_id: 50_000,
tun_src: {192, 168, 2, 3},
tun_dst: {192, 168, 2, 4}
]
in_port: 43_981,
eth_dst: "aabbcc998877",
eth_type: 2048,
vlan_vid: 5095,
ipv4_dst: {192, 168, 2, 1},
tunnel_id: 50_000,
tun_src: {192, 168, 2, 3},
tun_dst: {192, 168, 2, 4}
]
end
end
end