Class: SetDlDstAction
- Defined in:
- lib/openflowdev/actions/set_dl_dst_action.rb
Overview
Class to define an OpenFlow action for setting the ethernet (data layer) destination
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(order: nil, mac_addr: nil) ⇒ SetDlDstAction
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, mac_addr: nil) ⇒ SetDlDstAction
Parameters
order-
integer : The order of the action relative to other actions in Instruction.
mac_addr-
string : The MAC address to set in destination field of ethernet header.
37 38 39 40 41 |
# File 'lib/openflowdev/actions/set_dl_dst_action.rb', line 37 def initialize(order: nil, mac_addr: nil) super(order: order) raise ArgumentError, "MAC Address (mac_addr) required" @mac = mac_addr end |
Instance Method Details
#to_hash ⇒ Object
:nodoc:
43 44 45 |
# File 'lib/openflowdev/actions/set_dl_dst_action.rb', line 43 def to_hash #:nodoc: {:order => @order, 'set-dl-dst-action' => {:address => @mac}} end |