openflow: Fix aggregate request
This commit is contained in:
parent
c5e38155e1
commit
b32cfff395
22 changed files with 71 additions and 44 deletions
23
test/lib/openflow/ofp_packet_in2_test.exs
Normal file
23
test/lib/openflow/ofp_packet_in2_test.exs
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue