Class: PushPBBHeaderAction

Inherits:
Action
  • Object
show all
Defined in:
lib/openflowdev/actions/push_pbb_header_action.rb

Overview

Class to define an OpenFlow action to add a Provider Backbone Bridge encapsulation

Instance Attribute Summary

Attributes inherited from Action

#order

Instance Method Summary collapse

Constructor Details

#initialize(order: 0, eth_type: nil) ⇒ PushPBBHeaderAction

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
# File 'lib/openflowdev/actions/push_pbb_header_action.rb', line 37

def initialize(order: 0, eth_type: nil)
  super(order: order)
  @eth_type = eth_type
end

Instance Method Details

#to_hashObject

:nodoc:



42
43
44
# File 'lib/openflowdev/actions/push_pbb_header_action.rb', line 42

def to_hash #:nodoc:
  {:order => @order, 'push-pbb-aciton' => {'ethernet-type' => @eth_type}}
end