Class: SetVlanCfiAction
- Defined in:
- lib/openflowdev/actions/set_vlan_cfi_action.rb
Overview
Class used to define OpenFlow action to set the CFI field of VLAN header
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(order: nil, vlan_cfi: nil) ⇒ SetVlanCfiAction
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, vlan_cfi: nil) ⇒ SetVlanCfiAction
Parameters
order-
integer : The order of the action relative to other actions in Instruction.
vlan_cfi-
integer : The CFI field value to set.
37 38 39 40 41 |
# File 'lib/openflowdev/actions/set_vlan_cfi_action.rb', line 37 def initialize(order: nil, vlan_cfi: nil) super(order: order) raise ArgumentError, "VLAN CFI (vlan_cfi) required" unless vlan_cfi @vlan_cfi = vlan_cfi end |
Instance Method Details
#to_hash ⇒ Object
:nodoc:
43 44 45 |
# File 'lib/openflowdev/actions/set_vlan_cfi_action.rb', line 43 def to_hash #:nodoc: {:order => @order, 'set-vlan-cfi-action' => {'vlan-cfi' => @vlan_cfi}} end |