Class: SetTpSrcAction
- Defined in:
- lib/openflowdev/actions/set_tp_src_action.rb
Overview
Class used to define OpenFlow action to set TCP Source Port
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(order: nil, port: nil) ⇒ SetTpSrcAction
constructor
- Parameters *
order -
integer : The order of the action relative to other actions in Instruction.
- Parameters *
-
#to_hash ⇒ Object
:nodoc:.
Constructor Details
#initialize(order: nil, port: nil) ⇒ SetTpSrcAction
Parameters
order-
integer : The order of the action relative to other actions in Instruction.
port-
integer : The port number to set for TCP source port.
37 38 39 40 41 |
# File 'lib/openflowdev/actions/set_tp_src_action.rb', line 37 def initialize(order: nil, port: nil) super(order: order) raise ArgumentError, "Port (port) required" unless port @port = port end |
Instance Method Details
#to_hash ⇒ Object
:nodoc:
43 44 45 |
# File 'lib/openflowdev/actions/set_tp_src_action.rb', line 43 def to_hash #:nodoc: {:order => order, 'set-tp-src-action' => {:port => @port}} end |