Contents

NiciraRegLoad

@open_flow13

Copies value[0:n_bits] to destination[ofs:ofs+n_bits], where a[b:c] denotes the bits within 'a' numbered 'b' through 'c' (not including bit 'c').

Scenario: new(0xdeadbeef, :reg0)

  • When I create an OpenFlow action with:
    Pio::NiciraRegLoad.new(0xdeadbeef, :reg0)
  • Then the action has the following fields and values:
    fieldvalue
    offset0
    n_bits32
    destination:reg0
    value.to_hex0xdeadbeef

Scenario: new(0xdeadbeef, :metadata)

  • When I create an OpenFlow action with:
    Pio::NiciraRegLoad.new(0xdeadbeef, :metadata)
  • Then the action has the following fields and values:
    fieldvalue
    offset0
    n_bits64
    destination:metadata
    value.to_hex0xdeadbeef

Scenario: new(0xdeadbeef, :reg0, offset: 16, n_bits: 16)

  • When I create an OpenFlow action with:
    Pio::NiciraRegLoad.new(0xdeadbeef, :reg0, offset: 16, n_bits: 16)
  • Then the action has the following fields and values:
    fieldvalue
    offset16
    n_bits16
    destination:reg0
    value.to_hex0xdeadbeef

Source: features/open_flow13/nicira_reg_load.feature at commit 40dd0fb6, Pio (GPL license).