parent
2c4d247a2f
commit
95d2f2e87c
15 changed files with 735 additions and 71 deletions
|
|
@ -631,14 +631,14 @@ defmodule OfpActionTest do
|
|||
test_file = "test/packet_data/nx_clone.raw"
|
||||
packet = File.read!(test_file)
|
||||
actions = Openflow.Action.read(packet)
|
||||
|
||||
clone =
|
||||
Openflow.Action.NxClone.new(
|
||||
[
|
||||
Openflow.Action.PushVlan.new(),
|
||||
Openflow.Action.SetField.new({:vlan_vid, 5}),
|
||||
Openflow.Action.Output.new(10)
|
||||
]
|
||||
)
|
||||
Openflow.Action.NxClone.new([
|
||||
Openflow.Action.PushVlan.new(),
|
||||
Openflow.Action.SetField.new({:vlan_vid, 5}),
|
||||
Openflow.Action.Output.new(10)
|
||||
])
|
||||
|
||||
actions_bin = Openflow.Action.to_binary(clone)
|
||||
assert actions_bin == packet
|
||||
assert actions == [clone]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue