Class: PopMplsHeaderAction
- Defined in:
- lib/openflowdev/actions/pop_mpls_header_action.rb
Overview
Class that defines an OpenFlow Pop MPLS action ( remove the tunnel encapsulation )
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(order: 0, eth_type: nil) ⇒ PopMplsHeaderAction
constructor
- Parameters *
order -
integer : The order of the action relative to other actions in Instruction.
- Parameters *
-
#to_hash ⇒ Object
:nodoc:.
Constructor Details
#initialize(order: 0, eth_type: nil) ⇒ PopMplsHeaderAction
Parameters
order-
integer : The order of the action relative to other actions in Instruction.
eth_type-
integer : The ethernet type of the packet.
37 38 39 40 41 |
# File 'lib/openflowdev/actions/pop_mpls_header_action.rb', line 37 def initialize(order: 0, eth_type: nil) super(order: order) raise ArgumentError, 'Ethernet Type (eth_type) required' unless eth_type @eth_type = eth_type end |
Instance Method Details
#to_hash ⇒ Object
:nodoc:
43 44 45 |
# File 'lib/openflowdev/actions/pop_mpls_header_action.rb', line 43 def to_hash #:nodoc: {:order => @order, 'pop-mpls-action' => {'ethernet-type' => @eth_type}} end |