Class: Pio::OpenFlow13::NiciraRegMove

Inherits:
Pio::OpenFlow::NiciraAction show all
Defined in:
lib/pio/open_flow13/nicira_reg_move.rb

Overview

NXAST_REG_MOVE action

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Pio::OpenFlow::NiciraAction

nicira_action_header

Methods inherited from Pio::OpenFlow::Action

action_header, method_missing, read, #to_binary

Constructor Details

#initialize(arguments) ⇒ NiciraRegMove

rubocop:disable MethodLength



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/pio/open_flow13/nicira_reg_move.rb', line 30

def initialize(arguments)
  @source = arguments.fetch(:source)
  @destination = arguments.fetch(:destination)
  registers = { _source: { oxm_class: source_oxm_class,
                           oxm_field: source_oxm_field,
                           oxm_length: source_oxm_length },
                _destination: { oxm_class: destination_oxm_class,
                                oxm_field: destination_oxm_field,
                                oxm_length: destination_oxm_length } }
  options = %i[n_bits
               source_offset
               destination_offset].each_with_object({}) do |each, opts|
    opts[each] = arguments[each] if arguments[each]
  end
  super registers.merge(options)
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



49
50
51
# File 'lib/pio/open_flow13/nicira_reg_move.rb', line 49

def destination
  @destination
end

#sourceObject (readonly)

rubocop:enable MethodLength



48
49
50
# File 'lib/pio/open_flow13/nicira_reg_move.rb', line 48

def source
  @source
end