Class: SetTpDstAction
- Defined in:
- lib/openflowdev/actions/set_tp_dst_action.rb
Overview
Class used to define OpenFlow action to set the TCP Destination port
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(order: nil, port: nil) ⇒ SetTpDstAction
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) ⇒ SetTpDstAction
Parameters
order-
integer : The order of the action relative to other actions in Instruction.
port-
integer : The destination TCP port to set.
37 38 39 40 41 |
# File 'lib/openflowdev/actions/set_tp_dst_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_dst_action.rb', line 43 def to_hash #:nodoc: {:order => order, 'set-tp-dst-action' => {:port => @port}} end |