spec/pio/flow_mod_spec.rb in pio-0.19.0 vs spec/pio/flow_mod_spec.rb in pio-0.20.0
- old
+ new
@@ -1,6 +1,6 @@
-require 'pio/flow_mod'
+require 'pio/open_flow10/flow_mod'
describe Pio::FlowMod do
Given(:dump) do
[
0x01,
@@ -37,35 +37,35 @@
Then { flow_mod.xid == 0x15 }
Then { !flow_mod.body.empty? }
Then do
flow_mod.match.wildcards.keys == [
- :dl_vlan,
- :dl_src,
- :dl_dst,
- :dl_type,
- :nw_proto,
- :tp_src,
- :tp_dst,
- :nw_src_all,
- :nw_dst_all,
- :dl_vlan_pcp,
- :nw_tos
+ :vlan_vid,
+ :ether_source_address,
+ :ether_destination_address,
+ :ether_type,
+ :ip_protocol,
+ :transport_source_port,
+ :transport_destination_port,
+ :ip_source_address_all,
+ :ip_destination_address_all,
+ :vlan_priority,
+ :ip_tos
]
end
Then { flow_mod.match.in_port == 1 }
- Then { flow_mod.match.dl_src == '00:00:00:00:00:00' }
- Then { flow_mod.match.dl_dst == '00:00:00:00:00:00' }
- Then { flow_mod.match.dl_vlan == 0 }
- Then { flow_mod.match.dl_vlan_pcp == 0 }
- Then { flow_mod.match.dl_type == 0 }
- Then { flow_mod.match.nw_tos == 0 }
- Then { flow_mod.match.nw_proto == 0 }
- Then { flow_mod.match.nw_src == '0.0.0.0' }
- Then { flow_mod.match.nw_dst == '0.0.0.0' }
- Then { flow_mod.match.tp_src == 0 }
- Then { flow_mod.match.tp_dst == 0 }
+ Then { flow_mod.match.ether_source_address == '00:00:00:00:00:00' }
+ Then { flow_mod.match.ether_destination_address == '00:00:00:00:00:00' }
+ Then { flow_mod.match.vlan_vid == 0 }
+ Then { flow_mod.match.vlan_priority == 0 }
+ Then { flow_mod.match.ether_type == 0 }
+ Then { flow_mod.match.ip_tos == 0 }
+ Then { flow_mod.match.ip_protocol == 0 }
+ Then { flow_mod.match.ip_source_address == '0.0.0.0' }
+ Then { flow_mod.match.ip_destination_address == '0.0.0.0' }
+ Then { flow_mod.match.transport_source_port == 0 }
+ Then { flow_mod.match.transport_destination_port == 0 }
Then { flow_mod.cookie == 1 }
Then { flow_mod.command == :add }
Then { flow_mod.idle_timeout == 0 }
Then { flow_mod.hard_timeout == 0 }
Then { flow_mod.priority == 0xffff }
@@ -102,34 +102,34 @@
Then { flow_mod.xid == 0x15 }
Then { !flow_mod.body.empty? }
Then do
flow_mod.match.wildcards.keys == [
- :dl_vlan,
- :dl_src,
- :dl_dst,
- :dl_type,
- :nw_proto,
- :tp_src,
- :tp_dst,
- :nw_src_all,
- :nw_dst_all,
- :dl_vlan_pcp,
- :nw_tos
+ :vlan_vid,
+ :ether_source_address,
+ :ether_destination_address,
+ :ether_type,
+ :ip_protocol,
+ :transport_source_port,
+ :transport_destination_port,
+ :ip_source_address_all,
+ :ip_destination_address_all,
+ :vlan_priority,
+ :ip_tos
]
end
Then { flow_mod.match.in_port == 1 }
- Then { flow_mod.match.dl_src == '00:00:00:00:00:00' }
- Then { flow_mod.match.dl_dst == '00:00:00:00:00:00' }
- Then { flow_mod.match.dl_vlan == 0 }
- Then { flow_mod.match.dl_vlan_pcp == 0 }
- Then { flow_mod.match.dl_type == 0 }
- Then { flow_mod.match.nw_tos == 0 }
- Then { flow_mod.match.nw_proto == 0 }
- Then { flow_mod.match.nw_src == '0.0.0.0' }
- Then { flow_mod.match.nw_dst == '0.0.0.0' }
- Then { flow_mod.match.tp_src == 0 }
- Then { flow_mod.match.tp_dst == 0 }
+ Then { flow_mod.match.ether_source_address == '00:00:00:00:00:00' }
+ Then { flow_mod.match.ether_destination_address == '00:00:00:00:00:00' }
+ Then { flow_mod.match.vlan_vid == 0 }
+ Then { flow_mod.match.vlan_priority == 0 }
+ Then { flow_mod.match.ether_type == 0 }
+ Then { flow_mod.match.ip_tos == 0 }
+ Then { flow_mod.match.ip_protocol == 0 }
+ Then { flow_mod.match.ip_source_address == '0.0.0.0' }
+ Then { flow_mod.match.ip_destination_address == '0.0.0.0' }
+ Then { flow_mod.match.transport_source_port == 0 }
+ Then { flow_mod.match.transport_destination_port == 0 }
Then { flow_mod.cookie == 1 }
Then { flow_mod.command == :add }
Then { flow_mod.idle_timeout == 0 }
Then { flow_mod.hard_timeout == 0 }
Then { flow_mod.priority == 0xffff }