pio 0.19.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +20 -18
- data/features/{packet_data/arp-storm.pcap → arp-storm.pcap} +0 -0
- data/features/arp.feature +1 -1
- data/features/{packet_data/arp.pcap → arp.pcap} +0 -0
- data/features/dhcp.feature +210 -3
- data/features/{packet_data/dhcp.pcap → dhcp.pcap} +0 -0
- data/features/icmp.feature +1 -1
- data/features/{packet_data/icmp.pcap → icmp.pcap} +0 -0
- data/features/{packet_data/lldp.detailed.pcap → lldp.detailed.pcap} +0 -0
- data/features/lldp.feature +5 -5
- data/features/{packet_data/lldp.minimal.pcap → lldp.minimal.pcap} +0 -0
- data/features/{packet_data → open_flow10}/aggregate_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/aggregate_stats_request.raw +0 -0
- data/features/{packet_data → open_flow10}/barrier_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/barrier_request.raw +0 -0
- data/features/{packet_data → open_flow10}/desc_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/desc_stats_request.raw +0 -0
- data/features/open_flow10/echo_reply.feature +10 -10
- data/features/{packet_data → open_flow10}/echo_reply.raw +0 -0
- data/features/open_flow10/echo_request.feature +10 -10
- data/features/{packet_data → open_flow10}/echo_request.raw +0 -0
- data/features/{packet_data → open_flow10}/error.raw +0 -0
- data/features/open_flow10/exact_match.feature +33 -33
- data/features/open_flow10/features_reply.feature +71 -71
- data/features/{packet_data → open_flow10}/features_reply.raw +0 -0
- data/features/open_flow10/features_request.feature +9 -9
- data/features/{packet_data → open_flow10}/features_request.raw +0 -0
- data/features/open_flow10/flow_mod.feature +167 -167
- data/features/{packet_data → open_flow10}/flow_mod_add.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_delete.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_delete_strict.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_modify.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_mod_modify_strict.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_removed.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/flow_stats_request.raw +0 -0
- data/features/{packet_data → open_flow10}/get_config_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/get_config_request.raw +0 -0
- data/features/open_flow10/hello.feature +9 -9
- data/features/{packet_data → open_flow10}/hello.raw +0 -0
- data/features/open_flow10/packet_in.feature +4 -4
- data/features/{packet_data → open_flow10}/packet_in_arp_request.raw +0 -0
- data/features/{packet_data → open_flow10}/packet_in_cbench.raw +0 -0
- data/features/open_flow10/packet_out.feature +3 -3
- data/features/{packet_data → open_flow10}/packet_out.raw +0 -0
- data/features/{packet_data → open_flow10}/port_mod.raw +0 -0
- data/features/{packet_data → open_flow10}/port_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/port_stats_request.raw +0 -0
- data/features/open_flow10/port_status.feature +3 -3
- data/features/{packet_data → open_flow10}/port_status.raw +0 -0
- data/features/{packet_data → open_flow10}/queue_get_config_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/queue_get_config_request.raw +0 -0
- data/features/{packet_data → open_flow10}/set_config.raw +0 -0
- data/features/{packet_data → open_flow10}/table_stats_reply.raw +0 -0
- data/features/{packet_data → open_flow10}/table_stats_request.raw +0 -0
- data/features/{packet_data → open_flow10}/vendor.raw +0 -0
- data/features/{packet_data → open_flow10}/vendor_stats_request.raw +0 -0
- data/features/open_flow13/echo_reply.feature +64 -61
- data/features/{packet_data/echo13_reply_body.raw → open_flow13/echo_reply_body.raw} +0 -0
- data/features/{packet_data/echo13_reply_no_body.raw → open_flow13/echo_reply_no_body.raw} +0 -0
- data/features/open_flow13/echo_request.feature +64 -61
- data/features/{packet_data/echo13_request_body.raw → open_flow13/echo_request_body.raw} +0 -0
- data/features/{packet_data/echo13_request_no_body.raw → open_flow13/echo_request_no_body.raw} +0 -0
- data/features/open_flow13/features_reply.feature +53 -0
- data/features/open_flow13/features_reply.raw +0 -0
- data/features/open_flow13/features_request.feature +89 -0
- data/features/open_flow13/features_request.raw +0 -0
- data/features/open_flow13/hello.feature +26 -23
- data/features/{packet_data/hello13_no_version_bitmap.raw → open_flow13/hello_no_version_bitmap.raw} +0 -0
- data/features/{packet_data/hello13_version_bitmap.raw → open_flow13/hello_version_bitmap.raw} +0 -0
- data/features/step_definitions/open_flow_steps.rb +3 -0
- data/features/step_definitions/packet_data_steps.rb +9 -9
- data/features/udp.feature +3 -3
- data/features/{packet_data/udp_no_payload.raw → udp_no_payload.raw} +0 -0
- data/features/{packet_data/udp_with_payload.raw → udp_with_payload.raw} +0 -0
- data/lib/pio.rb +1 -9
- data/lib/pio/open_flow/actions.rb +8 -8
- data/lib/pio/open_flow/open_flow_header.rb +10 -0
- data/lib/pio/open_flow10.rb +15 -0
- data/lib/pio/open_flow10/echo.rb +15 -0
- data/lib/pio/open_flow10/exact_match.rb +51 -0
- data/lib/pio/{features.rb → open_flow10/features.rb} +8 -7
- data/lib/pio/{flow_mod.rb → open_flow10/flow_mod.rb} +1 -1
- data/lib/pio/{hello.rb → open_flow10/hello.rb} +0 -0
- data/lib/pio/{match.rb → open_flow10/match.rb} +46 -43
- data/lib/pio/{packet_in.rb → open_flow10/packet_in.rb} +0 -0
- data/lib/pio/{packet_out.rb → open_flow10/packet_out.rb} +0 -0
- data/lib/pio/{port_status.rb → open_flow10/port_status.rb} +0 -0
- data/lib/pio/open_flow13.rb +12 -0
- data/lib/pio/{echo.rb → open_flow13/echo.rb} +9 -13
- data/lib/pio/open_flow13/features_reply.rb +91 -0
- data/lib/pio/open_flow13/features_request.rb +54 -0
- data/lib/pio/{hello13.rb → open_flow13/hello.rb} +4 -1
- data/lib/pio/{set_eth_addr.rb → set_ether_address.rb} +7 -7
- data/lib/pio/{set_ip_addr.rb → set_ip_address.rb} +7 -7
- data/lib/pio/set_ip_tos.rb +1 -1
- data/lib/pio/set_transport_port.rb +2 -2
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +2 -2
- data/spec/pio/flow_mod_spec.rb +45 -45
- data/spec/pio/match_spec.rb +122 -120
- data/spec/pio/{hello13_spec.rb → open_flow13/hello_spec.rb} +11 -11
- data/spec/pio/packet_out_spec.rb +19 -19
- data/spec/pio/set_ether_destination_address_spec.rb +28 -0
- data/spec/pio/set_ether_source_address_spec.rb +28 -0
- data/spec/pio/set_ip_destination_address_spec.rb +27 -0
- data/spec/pio/set_ip_source_address_spec.rb +25 -0
- data/spec/pio/set_transport_destination_port_spec.rb +44 -0
- data/spec/pio/set_transport_source_port_spec.rb +44 -0
- data/spec/pio/wildcards_spec.rb +23 -21
- metadata +179 -165
- data/bin/byebug +0 -16
- data/lib/pio/exact_match.rb +0 -51
- data/spec/pio/set_eth_dst_addr_spec.rb +0 -28
- data/spec/pio/set_eth_src_addr_spec.rb +0 -28
- data/spec/pio/set_ip_dst_addr_spec.rb +0 -25
- data/spec/pio/set_ip_src_addr_spec.rb +0 -25
- data/spec/pio/set_transport_dst_port_spec.rb +0 -42
- data/spec/pio/set_transport_src_port_spec.rb +0 -42
File without changes
|
File without changes
|
@@ -1,36 +1,36 @@
|
|
1
|
-
Feature:
|
2
|
-
Scenario:
|
3
|
-
When I create an exact match from "packet_in_arp_request.raw"
|
1
|
+
Feature: Pio::ExactMatch
|
2
|
+
Scenario: new (from ARP request Packet In)
|
3
|
+
When I create an exact match from "open_flow10/packet_in_arp_request.raw"
|
4
4
|
And the message have the following fields and values:
|
5
|
-
| field
|
6
|
-
| wildcards
|
7
|
-
| in_port
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
| field | value |
|
6
|
+
| wildcards | {} |
|
7
|
+
| in_port | 1 |
|
8
|
+
| ether_source_address | ac:5d:10:31:37:79 |
|
9
|
+
| ether_destination_address | ff:ff:ff:ff:ff:ff |
|
10
|
+
| vlan_vid | 65535 |
|
11
|
+
| vlan_priority | 0 |
|
12
|
+
| ether_type | 2054 |
|
13
|
+
| ip_tos | 0 |
|
14
|
+
| ip_protocol | 1 |
|
15
|
+
| ip_source_address | 192.168.2.254 |
|
16
|
+
| ip_destination_address | 192.168.2.5 |
|
17
|
+
| transport_source_port | 0 |
|
18
|
+
| transport_destination_port | 0 |
|
19
19
|
|
20
|
-
Scenario:
|
21
|
-
When I create an exact match from "packet_in_cbench.raw"
|
20
|
+
Scenario: new (from Cbench Packet In)
|
21
|
+
When I create an exact match from "open_flow10/packet_in_cbench.raw"
|
22
22
|
And the message have the following fields and values:
|
23
|
-
| field
|
24
|
-
| wildcards
|
25
|
-
| in_port
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
| field | value |
|
24
|
+
| wildcards | {} |
|
25
|
+
| in_port | 1 |
|
26
|
+
| ether_source_address | 00:00:00:00:00:01 |
|
27
|
+
| ether_destination_address | 80:00:00:00:00:01 |
|
28
|
+
| vlan_vid | 65535 |
|
29
|
+
| vlan_priority | 0 |
|
30
|
+
| ether_type | 2048 |
|
31
|
+
| ip_tos | 0 |
|
32
|
+
| ip_protocol | 255 |
|
33
|
+
| ip_source_address | 192.168.0.40 |
|
34
|
+
| ip_destination_address | 192.168.1.40 |
|
35
|
+
| transport_source_port | 31256 |
|
36
|
+
| transport_destination_port | 22635 |
|
@@ -1,5 +1,5 @@
|
|
1
|
-
Feature: Features
|
2
|
-
Scenario:
|
1
|
+
Feature: Pio::Features::Reply
|
2
|
+
Scenario: new
|
3
3
|
When I try to create an OpenFlow message with:
|
4
4
|
"""
|
5
5
|
Pio::Features::Reply.new(
|
@@ -9,8 +9,8 @@ Feature: Features Reply
|
|
9
9
|
capabilities: [:flow_stats, :table_stats, :port_stats, :queue_stats,
|
10
10
|
:arp_match_ip],
|
11
11
|
actions: [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan,
|
12
|
-
:
|
13
|
-
:
|
12
|
+
:set_ether_source_address, :set_ether_destination_address, :set_ip_source_address, :set_ip_destination_address,
|
13
|
+
:set_ip_tos, :set_transport_source_port, :set_transport_destination_port, :enqueue],
|
14
14
|
ports: [{ port_no: 1,
|
15
15
|
hardware_address: '11:22:33:44:55:66',
|
16
16
|
name: 'port123',
|
@@ -21,76 +21,76 @@ Feature: Features Reply
|
|
21
21
|
"""
|
22
22
|
Then it should finish successfully
|
23
23
|
And the message have the following fields and values:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
24
|
+
| field | value |
|
25
|
+
| class | Pio::Features::Reply |
|
26
|
+
| ofp_version | 1 |
|
27
|
+
| message_type | 6 |
|
28
|
+
| message_length | 80 |
|
29
|
+
| transaction_id | 0 |
|
30
|
+
| xid | 0 |
|
31
|
+
| datapath_id | 291 |
|
32
|
+
| dpid | 291 |
|
33
|
+
| n_buffers | 256 |
|
34
|
+
| n_tables | 254 |
|
35
|
+
| capabilities | [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip] |
|
36
|
+
| actions | [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan, :set_ether_source_address, :set_ether_destination_address, :set_ip_source_address, :set_ip_destination_address, :set_ip_tos, :set_transport_source_port, :set_transport_destination_port, :enqueue] |
|
37
|
+
| ports.length | 1 |
|
38
|
+
| ports.first.datapath_id | 291 |
|
39
|
+
| ports.first.port_no | 1 |
|
40
|
+
| ports.first.mac_address | 11:22:33:44:55:66 |
|
41
|
+
| ports.first.hardware_address | 11:22:33:44:55:66 |
|
42
|
+
| ports.first.name | port123 |
|
43
|
+
| ports.first.config | [:port_down] |
|
44
|
+
| ports.first.state | [:link_down] |
|
45
|
+
| ports.first.curr | [:port_10gb_fd, :port_copper] |
|
46
|
+
| ports.first.advertised | [] |
|
47
|
+
| ports.first.supported | [] |
|
48
|
+
| ports.first.peer | [] |
|
49
49
|
|
50
|
-
Scenario:
|
51
|
-
When I try to parse a file named "features_reply.raw" with "Features::Reply" class
|
50
|
+
Scenario: read
|
51
|
+
When I try to parse a file named "open_flow10/features_reply.raw" with "Features::Reply" class
|
52
52
|
Then it should finish successfully
|
53
53
|
And the message have the following fields and values:
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
54
|
+
| field | value |
|
55
|
+
| class | Pio::Features::Reply |
|
56
|
+
| ofp_version | 1 |
|
57
|
+
| message_type | 6 |
|
58
|
+
| message_length | 176 |
|
59
|
+
| transaction_id | 2 |
|
60
|
+
| xid | 2 |
|
61
|
+
| datapath_id | 1 |
|
62
|
+
| dpid | 1 |
|
63
|
+
| n_buffers | 256 |
|
64
|
+
| n_tables | 1 |
|
65
|
+
| capabilities | [:flow_stats, :table_stats, :port_stats, :arp_match_ip] |
|
66
|
+
| actions | [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan, :set_ether_source_address, :set_ether_destination_address, :set_ip_source_address, :set_ip_destination_address, :set_ip_tos, :set_transport_source_port, :set_transport_destination_port, :enqueue] |
|
67
|
+
| ports.length | 3 |
|
68
|
+
| ports.first.datapath_id | 1 |
|
69
|
+
| ports.first.port_no | 2 |
|
70
|
+
| ports.first.mac_address | 16:7d:a4:37:ba:10 |
|
71
|
+
| ports.first.hardware_address | 16:7d:a4:37:ba:10 |
|
72
|
+
| ports.first.name | trema0-0 |
|
73
|
+
| ports.first.config | [] |
|
74
|
+
| ports.first.state | [] |
|
75
|
+
| ports.first.curr | [:port_10gb_fd, :port_copper] |
|
76
|
+
| ports.first.advertised | [] |
|
77
|
+
| ports.first.supported | [] |
|
78
|
+
| ports.first.peer | [] |
|
79
|
+
| ports.last.port_no | 1 |
|
80
|
+
| ports.last.number | 1 |
|
81
|
+
| ports.last.mac_address | 62:94:3a:f6:40:db |
|
82
|
+
| ports.last.hardware_address | 62:94:3a:f6:40:db |
|
83
|
+
| ports.last.name | trema1-0 |
|
84
|
+
| ports.last.config | [] |
|
85
|
+
| ports.last.state | [] |
|
86
|
+
| ports.last.curr | [:port_10gb_fd, :port_copper] |
|
87
|
+
| ports.last.advertised | [] |
|
88
|
+
| ports.last.supported | [] |
|
89
|
+
| ports.last.peer | [] |
|
90
|
+
| ports.last.up? | true |
|
91
|
+
| ports.last.down? | false |
|
92
|
+
| ports.last.local? | false |
|
93
93
|
|
94
94
|
Scenario: parse error
|
95
|
-
When I try to parse a file named "echo_reply.raw" with "Pio::Features::Reply" class
|
95
|
+
When I try to parse a file named "open_flow10/echo_reply.raw" with "Pio::Features::Reply" class
|
96
96
|
Then it should fail with "Pio::ParseError", "Invalid Features Reply message."
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
Feature: Features
|
2
|
-
Scenario:
|
1
|
+
Feature: Pio::Features::Request
|
2
|
+
Scenario: new
|
3
3
|
When I try to create an OpenFlow message with:
|
4
4
|
"""
|
5
5
|
Pio::Features::Request.new
|
@@ -15,7 +15,7 @@ Feature: Features Request
|
|
15
15
|
| xid | 0 |
|
16
16
|
| user_data | |
|
17
17
|
|
18
|
-
Scenario:
|
18
|
+
Scenario: new(transaction_id: 123)
|
19
19
|
When I try to create an OpenFlow message with:
|
20
20
|
"""
|
21
21
|
Pio::Features::Request.new(transaction_id: 123)
|
@@ -31,7 +31,7 @@ Feature: Features Request
|
|
31
31
|
| xid | 123 |
|
32
32
|
| user_data | |
|
33
33
|
|
34
|
-
Scenario:
|
34
|
+
Scenario: new(xid: 123)
|
35
35
|
When I try to create an OpenFlow message with:
|
36
36
|
"""
|
37
37
|
Pio::Features::Request.new(xid: 123)
|
@@ -47,22 +47,22 @@ Feature: Features Request
|
|
47
47
|
| xid | 123 |
|
48
48
|
| user_data | |
|
49
49
|
|
50
|
-
Scenario:
|
50
|
+
Scenario: new(xid: -1) and error
|
51
51
|
When I try to create an OpenFlow message with:
|
52
52
|
"""
|
53
53
|
Pio::Features::Request.new(xid: -1)
|
54
54
|
"""
|
55
55
|
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
56
56
|
|
57
|
-
Scenario:
|
57
|
+
Scenario: new(xid: 2**32) and error
|
58
58
|
When I try to create an OpenFlow message with:
|
59
59
|
"""
|
60
60
|
Pio::Features::Request.new(xid: 2**32)
|
61
61
|
"""
|
62
62
|
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
63
63
|
|
64
|
-
Scenario:
|
65
|
-
When I try to parse a file named "features_request.raw" with "Pio::Features::Request" class
|
64
|
+
Scenario: read
|
65
|
+
When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Features::Request" class
|
66
66
|
Then it should finish successfully
|
67
67
|
And the message have the following fields and values:
|
68
68
|
| field | value |
|
@@ -75,5 +75,5 @@ Feature: Features Request
|
|
75
75
|
| user_data | |
|
76
76
|
|
77
77
|
Scenario: parse error
|
78
|
-
When I try to parse a file named "echo_request.raw" with "Pio::Features::Request" class
|
78
|
+
When I try to parse a file named "open_flow10/echo_request.raw" with "Pio::Features::Request" class
|
79
79
|
Then it should fail with "Pio::ParseError", "Invalid Features Request message."
|
File without changes
|
@@ -1,181 +1,181 @@
|
|
1
|
-
Feature:
|
2
|
-
Scenario:
|
3
|
-
When I try to parse a file named "flow_mod_add.raw" with "FlowMod" class
|
1
|
+
Feature: Pio::FlowMod
|
2
|
+
Scenario: read (Flow Mod Add)
|
3
|
+
When I try to parse a file named "open_flow10/flow_mod_add.raw" with "Pio::FlowMod" class
|
4
4
|
Then it should finish successfully
|
5
5
|
And the message have the following fields and values:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
6
|
+
| field | value |
|
7
|
+
| ofp_version | 1 |
|
8
|
+
| message_type | 14 |
|
9
|
+
| message_length | 192 |
|
10
|
+
| transaction_id | 0 |
|
11
|
+
| xid | 0 |
|
12
|
+
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
13
|
+
| match.in_port | 1 |
|
14
|
+
| match.ether_source_address | 00:00:00:00:00:0a |
|
15
|
+
| match.ether_destination_address | 00:00:00:00:00:14 |
|
16
|
+
| match.vlan_vid | 0 |
|
17
|
+
| match.vlan_priority | 0 |
|
18
|
+
| match.ether_type | 2048 |
|
19
|
+
| match.ip_tos | 0 |
|
20
|
+
| match.ip_protocol | 1 |
|
21
|
+
| match.ip_source_address | 10.0.0.0 |
|
22
|
+
| match.ip_source_address.prefixlen | 8 |
|
23
|
+
| match.ip_destination_address | 20.0.0.0 |
|
24
|
+
| match.ip_destination_address.prefixlen | 8 |
|
25
|
+
| match.transport_source_port | 8 |
|
26
|
+
| match.transport_destination_port | 0 |
|
27
|
+
| cookie | 0 |
|
28
|
+
| command | add |
|
29
|
+
| idle_timeout | 0 |
|
30
|
+
| hard_timeout | 0 |
|
31
|
+
| priority | 65535 |
|
32
|
+
| buffer_id | 4294967295 |
|
33
|
+
| out_port | 65535 |
|
34
|
+
| flags | [:send_flow_rem] |
|
35
|
+
| actions.length | 12 |
|
36
|
+
| actions.first.class | Pio::SetVlanVid |
|
37
|
+
| actions.first.vlan_id | 10 |
|
38
38
|
|
39
|
-
Scenario:
|
40
|
-
When I try to parse a file named "flow_mod_modify.raw" with "FlowMod" class
|
39
|
+
Scenario: read (Flow Mod Modify)
|
40
|
+
When I try to parse a file named "open_flow10/flow_mod_modify.raw" with "Pio::FlowMod" class
|
41
41
|
Then it should finish successfully
|
42
42
|
And the message have the following fields and values:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
43
|
+
| field | value |
|
44
|
+
| ofp_version | 1 |
|
45
|
+
| message_type | 14 |
|
46
|
+
| message_length | 192 |
|
47
|
+
| transaction_id | 0 |
|
48
|
+
| xid | 0 |
|
49
|
+
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
50
|
+
| match.in_port | 1 |
|
51
|
+
| match.ether_source_address | 00:00:00:00:00:0a |
|
52
|
+
| match.ether_destination_address | 00:00:00:00:00:14 |
|
53
|
+
| match.vlan_vid | 0 |
|
54
|
+
| match.vlan_priority | 0 |
|
55
|
+
| match.ether_type | 2048 |
|
56
|
+
| match.ip_tos | 0 |
|
57
|
+
| match.ip_protocol | 1 |
|
58
|
+
| match.ip_source_address | 10.0.0.0 |
|
59
|
+
| match.ip_source_address.prefixlen | 8 |
|
60
|
+
| match.ip_destination_address | 20.0.0.0 |
|
61
|
+
| match.ip_destination_address.prefixlen | 8 |
|
62
|
+
| match.transport_source_port | 8 |
|
63
|
+
| match.transport_destination_port | 0 |
|
64
|
+
| cookie | 0 |
|
65
|
+
| command | modify |
|
66
|
+
| idle_timeout | 0 |
|
67
|
+
| hard_timeout | 0 |
|
68
|
+
| priority | 65535 |
|
69
|
+
| buffer_id | 4294967295 |
|
70
|
+
| out_port | 65535 |
|
71
|
+
| flags | [:send_flow_rem] |
|
72
|
+
| actions.length | 12 |
|
73
|
+
| actions.first.class | Pio::SetVlanVid |
|
74
|
+
| actions.first.vlan_id | 10 |
|
75
75
|
|
76
|
-
Scenario:
|
77
|
-
When I try to parse a file named "flow_mod_modify_strict.raw" with "FlowMod" class
|
76
|
+
Scenario: read (Flow Mod Modify Strict)
|
77
|
+
When I try to parse a file named "open_flow10/flow_mod_modify_strict.raw" with "Pio::FlowMod" class
|
78
78
|
Then it should finish successfully
|
79
79
|
And the message have the following fields and values:
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
80
|
+
| field | value |
|
81
|
+
| ofp_version | 1 |
|
82
|
+
| message_type | 14 |
|
83
|
+
| message_length | 192 |
|
84
|
+
| transaction_id | 0 |
|
85
|
+
| xid | 0 |
|
86
|
+
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
87
|
+
| match.in_port | 1 |
|
88
|
+
| match.ether_source_address | 00:00:00:00:00:0a |
|
89
|
+
| match.ether_destination_address | 00:00:00:00:00:14 |
|
90
|
+
| match.vlan_vid | 0 |
|
91
|
+
| match.vlan_priority | 0 |
|
92
|
+
| match.ether_type | 2048 |
|
93
|
+
| match.ip_tos | 0 |
|
94
|
+
| match.ip_protocol | 1 |
|
95
|
+
| match.ip_source_address | 10.0.0.0 |
|
96
|
+
| match.ip_source_address.prefixlen | 8 |
|
97
|
+
| match.ip_destination_address | 20.0.0.0 |
|
98
|
+
| match.ip_destination_address.prefixlen | 8 |
|
99
|
+
| match.transport_source_port | 8 |
|
100
|
+
| match.transport_destination_port | 0 |
|
101
|
+
| cookie | 0 |
|
102
|
+
| command | modify_strict |
|
103
|
+
| idle_timeout | 0 |
|
104
|
+
| hard_timeout | 0 |
|
105
|
+
| priority | 65535 |
|
106
|
+
| buffer_id | 4294967295 |
|
107
|
+
| out_port | 65535 |
|
108
|
+
| flags | [:send_flow_rem] |
|
109
|
+
| actions.length | 12 |
|
110
|
+
| actions.first.class | Pio::SetVlanVid |
|
111
|
+
| actions.first.vlan_id | 10 |
|
112
112
|
|
113
|
-
Scenario:
|
114
|
-
When I try to parse a file named "flow_mod_delete.raw" with "FlowMod" class
|
113
|
+
Scenario: read (Flow Mod Delete)
|
114
|
+
When I try to parse a file named "open_flow10/flow_mod_delete.raw" with "Pio::FlowMod" class
|
115
115
|
Then it should finish successfully
|
116
116
|
And the message have the following fields and values:
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
117
|
+
| field | value |
|
118
|
+
| ofp_version | 1 |
|
119
|
+
| message_type | 14 |
|
120
|
+
| message_length | 72 |
|
121
|
+
| transaction_id | 0 |
|
122
|
+
| xid | 0 |
|
123
|
+
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
124
|
+
| match.in_port | 1 |
|
125
|
+
| match.ether_source_address | 00:00:00:00:00:0a |
|
126
|
+
| match.ether_destination_address | 00:00:00:00:00:00 |
|
127
|
+
| match.vlan_vid | 0 |
|
128
|
+
| match.vlan_priority | 0 |
|
129
|
+
| match.ether_type | 2048 |
|
130
|
+
| match.ip_tos | 0 |
|
131
|
+
| match.ip_protocol | 1 |
|
132
|
+
| match.ip_source_address | 10.0.0.0 |
|
133
|
+
| match.ip_source_address.prefixlen | 8 |
|
134
|
+
| match.ip_destination_address | 20.0.0.0 |
|
135
|
+
| match.ip_destination_address.prefixlen | 8 |
|
136
|
+
| match.transport_source_port | 8 |
|
137
|
+
| match.transport_destination_port | 0 |
|
138
|
+
| cookie | 0 |
|
139
|
+
| command | delete |
|
140
|
+
| idle_timeout | 0 |
|
141
|
+
| hard_timeout | 0 |
|
142
|
+
| priority | 65535 |
|
143
|
+
| buffer_id | 4294967295 |
|
144
|
+
| out_port | 65535 |
|
145
|
+
| flags | [] |
|
146
|
+
| actions | [] |
|
147
147
|
|
148
|
-
Scenario:
|
149
|
-
When I try to parse a file named "flow_mod_delete_strict.raw" with "FlowMod" class
|
148
|
+
Scenario: read (Flow Mod Delete Strict)
|
149
|
+
When I try to parse a file named "open_flow10/flow_mod_delete_strict.raw" with "Pio::FlowMod" class
|
150
150
|
Then it should finish successfully
|
151
151
|
And the message have the following fields and values:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
152
|
+
| field | value |
|
153
|
+
| ofp_version | 1 |
|
154
|
+
| message_type | 14 |
|
155
|
+
| message_length | 72 |
|
156
|
+
| transaction_id | 0 |
|
157
|
+
| xid | 0 |
|
158
|
+
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
159
|
+
| match.in_port | 1 |
|
160
|
+
| match.ether_source_address | 00:00:00:00:00:0a |
|
161
|
+
| match.ether_destination_address | 00:00:00:00:00:14 |
|
162
|
+
| match.vlan_vid | 0 |
|
163
|
+
| match.vlan_priority | 0 |
|
164
|
+
| match.ether_type | 2048 |
|
165
|
+
| match.ip_tos | 0 |
|
166
|
+
| match.ip_protocol | 1 |
|
167
|
+
| match.ip_source_address | 10.0.0.0 |
|
168
|
+
| match.ip_source_address.prefixlen | 8 |
|
169
|
+
| match.ip_destination_address | 20.0.0.0 |
|
170
|
+
| match.ip_destination_address.prefixlen | 8 |
|
171
|
+
| match.transport_source_port | 8 |
|
172
|
+
| match.transport_destination_port | 0 |
|
173
|
+
| cookie | 1 |
|
174
|
+
| command | delete_strict |
|
175
|
+
| idle_timeout | 0 |
|
176
|
+
| hard_timeout | 0 |
|
177
|
+
| priority | 65535 |
|
178
|
+
| buffer_id | 4294967295 |
|
179
|
+
| out_port | 65535 |
|
180
|
+
| flags | [] |
|
181
|
+
| actions | [] |
|