openflow: Fix aggregate request

This commit is contained in:
Eishun Kondoh 2019-05-01 23:54:40 +09:00
parent c5e38155e1
commit b32cfff395
22 changed files with 71 additions and 44 deletions

View file

@ -0,0 +1,23 @@
defmodule OfpPacketIn2Test do
use ExUnit.Case
doctest Openflow
describe "Openflow.read/1" do
test "with NX_PACKET_IN2 packet(with properties)" do
{:ok, pktin, ""} =
"test/packet_data/nx_packet_in2.raw"
|> File.read!()
|> Openflow.read()
assert pktin.version == 1
assert pktin.xid == 0
assert pktin.full_len == 64
assert pktin.table_id == 7
assert pktin.buffer_id == 0x114
assert pktin.cookie == 0xFEDCBA9876543210
assert pktin.reason == :action
assert pktin.metadata == [metadata: 0x5A5A5A5A5A5A5A5A]
assert pktin.userdata == <<1, 2, 3, 4, 5>>
end
end
end