quality: Add test cases for openflow actions
This commit is contained in:
parent
84a827eea1
commit
d2a6488f79
9 changed files with 112 additions and 22 deletions
|
|
@ -11,6 +11,20 @@ defmodule Openflow.Action.NxController do
|
|||
alias __MODULE__
|
||||
alias Openflow.Action.Experimenter
|
||||
|
||||
@type max_len :: :max | :no_buffer | non_neg_integer()
|
||||
@type packet_in_reason ::
|
||||
:no_match | :action | :invalid_ttl | :action_set | :group | :packet_out
|
||||
@type t :: %NxController{
|
||||
max_len: max_len(),
|
||||
id: non_neg_integer(),
|
||||
reason: packet_in_reason()
|
||||
}
|
||||
|
||||
@spec new(
|
||||
max_len: max_len(),
|
||||
id: non_neg_integer(),
|
||||
reason: packet_in_reason()
|
||||
) :: t()
|
||||
def new(options \\ []) do
|
||||
%NxController{
|
||||
max_len: options[:max_len] || :no_buffer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue