quality: Add test cases for port_desc and port_stats messages
This commit is contained in:
parent
2e3f772b1f
commit
599f1947db
8 changed files with 153 additions and 31 deletions
|
|
@ -13,10 +13,6 @@ defmodule Openflow.Multipart.PortDesc.Reply do
|
|||
|
||||
def ofp_type, do: 18
|
||||
|
||||
def new(ports \\ []) do
|
||||
%Reply{ports: ports}
|
||||
end
|
||||
|
||||
def read(<<ports_bin::bytes>>) do
|
||||
ports = for <<port_bin::64-bytes <- ports_bin>>, do: Openflow.Port.read(port_bin)
|
||||
%Reply{ports: Enum.reverse(ports)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue