Fix to accept transaction_id to all message structs

This commit is contained in:
Eishun Kondoh 2018-03-22 23:49:03 +09:00
parent bb74f3d8c4
commit 4803c61061
29 changed files with 118 additions and 34 deletions

View file

@ -1 +0,0 @@
Replace regexp Queue with: Group

View file

@ -1 +0,0 @@
shun159@shun159.8967:1509553730

View file

@ -12,7 +12,14 @@ defmodule Openflow.Multipart.Group.Request do
def ofp_type, do: 18
def new(group_id \\ :all) do
def new(options) when is_list(options) do
%Request{
xid: options[:xid] || 0,
group_id: options[:group_id] || :all
}
end
def new(group_id) when is_integer(group_id) or is_atom(group_id) do
%Request{group_id: group_id}
end