Class: SetMplsTTLAction
- Defined in:
- lib/openflowdev/actions/set_mpls_ttl_action.rb
Overview
Class to define an OpenFlow action to set the MPLS Time To Live (TTL)
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(order: 0, mpls_ttl: nil) ⇒ SetMplsTTLAction
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, mpls_ttl: nil) ⇒ SetMplsTTLAction
Parameters
order-
integer : The order of the action relative to other actions in Instruction.
mpls_ttl-
integer : The Time To Live to set in the MPLS header.
37 38 39 40 41 |
# File 'lib/openflowdev/actions/set_mpls_ttl_action.rb', line 37 def initialize(order: 0, mpls_ttl: nil) super(order: order) raise ArgumentError, "MPLS TTL (mpls_ttl) required" unless mpls_ttl @mpls_ttl = mpls_ttl end |
Instance Method Details
#to_hash ⇒ Object
:nodoc:
43 44 45 |
# File 'lib/openflowdev/actions/set_mpls_ttl_action.rb', line 43 def to_hash #:nodoc: {:order => order, 'set-mpls-ttl-action' => {'mpls-ttl' => @mpls_ttl}} end |