pio 0.25.0 → 0.26.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 +8 -0
- data/README.md +4 -0
- data/Rakefile +1 -1
- data/bin/terminal-notifier +16 -0
- data/features/open_flow10/bad_request.feature +35 -0
- data/features/open_flow10/bad_request.raw +0 -0
- data/features/open_flow10/barrier_reply.feature +4 -4
- data/features/open_flow10/barrier_request.feature +4 -4
- data/features/open_flow10/echo_reply.feature +13 -13
- data/features/open_flow10/echo_request.feature +6 -6
- data/features/open_flow10/enqueue.feature +17 -0
- data/features/open_flow10/features_reply.feature +2 -2
- data/features/open_flow10/features_request.feature +28 -28
- data/features/open_flow10/flow_mod.feature +5 -5
- data/features/open_flow10/flow_stats_reply.feature +12 -12
- data/features/open_flow10/flow_stats_request.feature +3 -3
- data/features/open_flow10/hello.feature +8 -15
- data/features/open_flow10/hello_failed.feature +69 -0
- data/features/open_flow10/hello_failed.raw +0 -0
- data/features/open_flow10/nxast_learn.raw +0 -0
- data/features/open_flow10/packet_in.feature +2 -2
- data/features/open_flow10/packet_out.feature +13 -13
- data/features/open_flow10/port_status.feature +1 -1
- data/features/open_flow10/send_out_port.feature +106 -0
- data/features/open_flow10/set_ether_destination_address.feature +16 -0
- data/features/open_flow10/set_ether_source_address.feature +16 -0
- data/features/open_flow10/set_ip_destination_address.feature +16 -0
- data/features/open_flow10/set_ip_source_address.feature +16 -0
- data/features/open_flow10/set_ip_tos.feature +16 -0
- data/features/open_flow10/set_transport_destination_port.feature +16 -0
- data/features/open_flow10/set_transport_source_port.feature +16 -0
- data/features/open_flow10/set_vlan_priority.feature +16 -0
- data/features/open_flow10/set_vlan_vid.feature +16 -0
- data/features/open_flow10/strip_vlan_header.feature +15 -0
- data/features/open_flow10/vendor_action.feature +14 -0
- data/features/open_flow13/bad_request.feature +35 -0
- data/features/open_flow13/bad_request.raw +0 -0
- data/features/open_flow13/echo_reply.feature +7 -7
- data/features/open_flow13/echo_request.feature +7 -7
- data/features/open_flow13/features_reply.feature +2 -2
- data/features/open_flow13/features_request.feature +28 -28
- data/features/open_flow13/flow_mod.feature +24 -24
- data/features/open_flow13/hello.feature +5 -5
- data/features/open_flow13/hello_failed.feature +69 -0
- data/features/open_flow13/hello_failed.raw +0 -0
- data/features/open_flow13/packet_in.feature +3 -3
- data/features/open_flow13/packet_out.feature +3 -3
- data/features/open_flow13/send_out_port.feature +101 -10
- data/features/open_flow13/table_stats_reply.raw +0 -0
- data/features/open_flow13/table_stats_request.raw +0 -0
- data/features/open_flow_read.feature +6 -0
- data/features/step_definitions/Gemfile +9 -0
- data/features/step_definitions/Gemfile.lock +76 -0
- data/features/step_definitions/Guardfile +4 -0
- data/features/step_definitions/LICENSE +675 -0
- data/features/step_definitions/README.md +7 -0
- data/features/step_definitions/Rakefile +10 -0
- data/features/step_definitions/dump_flows_steps.rb +13 -0
- data/features/step_definitions/packet_data_steps.rb +4 -0
- data/features/step_definitions/rest_api_steps.rb +40 -0
- data/features/step_definitions/show_stats_steps.rb +83 -0
- data/features/step_definitions/trema_steps.rb +33 -0
- data/features/step_definitions/virtual_link_steps.rb +8 -0
- data/lib/pio/open_flow.rb +5 -5
- data/lib/pio/open_flow/echo.rb +1 -1
- data/lib/pio/open_flow/error.rb +19 -0
- data/lib/pio/open_flow/format.rb +2 -1
- data/lib/pio/open_flow/hello_failed_code.rb +21 -0
- data/lib/pio/open_flow/open_flow_header.rb +11 -2
- data/lib/pio/open_flow/port.rb +69 -0
- data/lib/pio/open_flow10.rb +5 -0
- data/lib/pio/open_flow10/actions.rb +8 -6
- data/lib/pio/open_flow10/enqueue.rb +13 -13
- data/lib/pio/open_flow10/error.rb +28 -0
- data/lib/pio/open_flow10/error/bad_request.rb +66 -0
- data/lib/pio/open_flow10/error/error_type10.rb +26 -0
- data/lib/pio/open_flow10/error/hello_failed.rb +41 -0
- data/lib/pio/open_flow10/features.rb +6 -10
- data/lib/pio/open_flow10/flow_mod.rb +1 -1
- data/lib/pio/open_flow10/flow_stats_request.rb +1 -1
- data/lib/pio/open_flow10/hello.rb +2 -2
- data/lib/pio/open_flow10/match.rb +2 -2
- data/lib/pio/{open_flow/phy_port.rb → open_flow10/phy_port16.rb} +4 -4
- data/lib/pio/open_flow10/port16.rb +21 -0
- data/lib/pio/open_flow10/port_status.rb +1 -1
- data/lib/pio/open_flow10/send_out_port.rb +16 -40
- data/lib/pio/open_flow10/set_ether_address.rb +9 -8
- data/lib/pio/open_flow10/set_ip_address.rb +4 -4
- data/lib/pio/open_flow10/set_ip_tos.rb +4 -4
- data/lib/pio/open_flow10/set_transport_port.rb +12 -12
- data/lib/pio/open_flow10/set_vlan.rb +4 -4
- data/lib/pio/open_flow10/set_vlan_vid.rb +0 -12
- data/lib/pio/open_flow10/strip_vlan_header.rb +7 -7
- data/lib/pio/open_flow10/vendor_action.rb +33 -0
- data/lib/pio/open_flow13.rb +3 -0
- data/lib/pio/open_flow13/actions.rb +3 -3
- data/lib/pio/open_flow13/error.rb +28 -0
- data/lib/pio/open_flow13/error/bad_request.rb +66 -0
- data/lib/pio/open_flow13/error/error_type13.rb +37 -0
- data/lib/pio/open_flow13/error/hello_failed.rb +42 -0
- data/lib/pio/open_flow13/features_reply.rb +33 -33
- data/lib/pio/open_flow13/features_request.rb +3 -3
- data/lib/pio/open_flow13/flow_mod.rb +2 -2
- data/lib/pio/open_flow13/goto_table.rb +2 -0
- data/lib/pio/open_flow13/packet_out.rb +1 -1
- data/lib/pio/open_flow13/port32.rb +21 -0
- data/lib/pio/open_flow13/send_out_port.rb +3 -2
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +5 -5
- data/spec/pio/open_flow10/enqueue_spec.rb +22 -22
- data/spec/pio/open_flow10/error/hello_failed_spec.rb +26 -0
- data/spec/pio/open_flow10/flow_mod_spec.rb +6 -6
- data/spec/pio/open_flow10/flow_stats_request_spec.rb +1 -1
- data/spec/pio/open_flow10/hello_spec.rb +3 -3
- data/spec/pio/open_flow10/packet_out_spec.rb +33 -33
- data/spec/pio/{open_flow/phy_port_spec.rb → open_flow10/phy_port16_spec.rb} +7 -7
- data/spec/pio/open_flow10/send_out_port_spec.rb +28 -28
- data/spec/pio/open_flow10/set_ether_destination_address_spec.rb +2 -2
- data/spec/pio/open_flow10/set_ether_source_address_spec.rb +2 -2
- data/spec/pio/open_flow10/set_ip_destination_address_spec.rb +4 -4
- data/spec/pio/open_flow10/set_ip_source_address_spec.rb +4 -4
- data/spec/pio/open_flow10/set_ip_tos_spec.rb +4 -4
- data/spec/pio/open_flow10/set_transport_destination_port_spec.rb +11 -11
- data/spec/pio/open_flow10/set_transport_source_port_spec.rb +11 -11
- data/spec/pio/open_flow10/set_vlan_priority_spec.rb +4 -4
- data/spec/pio/open_flow10/set_vlan_vid_spec.rb +4 -4
- data/spec/pio/open_flow10/strip_vlan_header_spec.rb +6 -6
- data/spec/pio/open_flow13/error/bad_request_spec.rb +6 -0
- data/spec/pio/open_flow13/error/hello_failed_spec.rb +26 -0
- data/spec/pio/open_flow13/hello_spec.rb +3 -3
- data/spec/support/shared_examples_for_openflow_messages.rb +40 -27
- metadata +106 -16
- data/lib/pio/open_flow/port_number.rb +0 -39
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetIpTos
|
3
|
+
|
4
|
+
Scenario: new(0b11111100)
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetIpTos.new(0b11111100)
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 8 |
|
13
|
+
| length | 8 |
|
14
|
+
| type_of_service | 252 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetTransportDestinationPort
|
3
|
+
|
4
|
+
Scenario: new(100)
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetTransportDestinationPort.new(100)
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 10 |
|
13
|
+
| length | 8 |
|
14
|
+
| port | 100 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetTransportSourcePort
|
3
|
+
|
4
|
+
Scenario: new(100)
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetTransportSourcePort.new(100)
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 9 |
|
13
|
+
| length | 8 |
|
14
|
+
| port | 100 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetVlanPriority
|
3
|
+
|
4
|
+
Scenario: new(1)
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetVlanPriority.new(1)
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 2 |
|
13
|
+
| length | 8 |
|
14
|
+
| vlan_priority | 1 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetVlanVid
|
3
|
+
|
4
|
+
Scenario: new(1)
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetVlanVid.new(1)
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 1 |
|
13
|
+
| length | 8 |
|
14
|
+
| vlan_id | 1 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::StripVlanHeader
|
3
|
+
|
4
|
+
Scenario: new
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::StripVlanHeader.new
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 3 |
|
13
|
+
| length | 8 |
|
14
|
+
|
15
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::VendorAction
|
3
|
+
|
4
|
+
Scenario: new(1)
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::VendorAction.new(1)
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type.to_hex | 0xffff |
|
13
|
+
| length | 8 |
|
14
|
+
| vendor | 1 |
|
@@ -0,0 +1,35 @@
|
|
1
|
+
@open_flow13
|
2
|
+
Feature: Pio::Error::BadRequest
|
3
|
+
|
4
|
+
Request was not understood error.
|
5
|
+
|
6
|
+
Scenario: new (raw_data = Echo request 1.0)
|
7
|
+
When I try to create an OpenFlow message with:
|
8
|
+
"""
|
9
|
+
Pio::Error::BadRequest.new(raw_data: Pio::OpenFlow10::Echo::Request.new.to_binary)
|
10
|
+
"""
|
11
|
+
Then it should finish successfully
|
12
|
+
And the message has the following fields and values:
|
13
|
+
| field | value |
|
14
|
+
| ofp_version | 4 |
|
15
|
+
| message_type | 1 |
|
16
|
+
| length | 20 |
|
17
|
+
| transaction_id | 0 |
|
18
|
+
| xid | 0 |
|
19
|
+
| error_type | :bad_request |
|
20
|
+
| error_code | :bad_version |
|
21
|
+
| raw_data.length | 8 |
|
22
|
+
|
23
|
+
Scenario: read
|
24
|
+
When I try to parse a file named "open_flow13/bad_request.raw" with "Pio::Error::BadRequest" class
|
25
|
+
Then it should finish successfully
|
26
|
+
And the message has the following fields and values:
|
27
|
+
| field | value |
|
28
|
+
| ofp_version | 4 |
|
29
|
+
| message_type | 1 |
|
30
|
+
| length | 20 |
|
31
|
+
| transaction_id | 0 |
|
32
|
+
| xid | 0 |
|
33
|
+
| error_type | :bad_request |
|
34
|
+
| error_code | :bad_version |
|
35
|
+
| raw_data.length | 8 |
|
Binary file
|
@@ -10,7 +10,7 @@ Feature: Pio::Echo::Reply
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 4 |
|
12
12
|
| message_type | 3 |
|
13
|
-
|
|
13
|
+
| length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| body | |
|
@@ -26,7 +26,7 @@ Feature: Pio::Echo::Reply
|
|
26
26
|
| field | value |
|
27
27
|
| ofp_version | 4 |
|
28
28
|
| message_type | 3 |
|
29
|
-
|
|
29
|
+
| length | 8 |
|
30
30
|
| transaction_id | 123 |
|
31
31
|
| xid | 123 |
|
32
32
|
| body | |
|
@@ -42,7 +42,7 @@ Feature: Pio::Echo::Reply
|
|
42
42
|
| field | value |
|
43
43
|
| ofp_version | 4 |
|
44
44
|
| message_type | 3 |
|
45
|
-
|
|
45
|
+
| length | 8 |
|
46
46
|
| transaction_id | 123 |
|
47
47
|
| xid | 123 |
|
48
48
|
| body | |
|
@@ -58,7 +58,7 @@ Feature: Pio::Echo::Reply
|
|
58
58
|
| field | value |
|
59
59
|
| ofp_version | 4 |
|
60
60
|
| message_type | 3 |
|
61
|
-
|
|
61
|
+
| length | 23 |
|
62
62
|
| transaction_id | 0 |
|
63
63
|
| xid | 0 |
|
64
64
|
| body | echo reply body |
|
@@ -74,7 +74,7 @@ Feature: Pio::Echo::Reply
|
|
74
74
|
| field | value |
|
75
75
|
| ofp_version | 4 |
|
76
76
|
| message_type | 3 |
|
77
|
-
|
|
77
|
+
| length | 23 |
|
78
78
|
| transaction_id | 0 |
|
79
79
|
| xid | 0 |
|
80
80
|
| body | echo reply body |
|
@@ -94,7 +94,7 @@ Feature: Pio::Echo::Reply
|
|
94
94
|
| field | value |
|
95
95
|
| ofp_version | 4 |
|
96
96
|
| message_type | 3 |
|
97
|
-
|
|
97
|
+
| length | 8 |
|
98
98
|
| transaction_id | 0 |
|
99
99
|
| xid | 0 |
|
100
100
|
| body | |
|
@@ -107,7 +107,7 @@ Feature: Pio::Echo::Reply
|
|
107
107
|
| field | value |
|
108
108
|
| ofp_version | 4 |
|
109
109
|
| message_type | 3 |
|
110
|
-
|
|
110
|
+
| length | 28 |
|
111
111
|
| transaction_id | 0 |
|
112
112
|
| xid | 0 |
|
113
113
|
| body | hogehogehogehogehoge |
|
@@ -10,7 +10,7 @@ Feature: Pio::Echo::Request
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 4 |
|
12
12
|
| message_type | 2 |
|
13
|
-
|
|
13
|
+
| length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| body | |
|
@@ -26,7 +26,7 @@ Feature: Pio::Echo::Request
|
|
26
26
|
| field | value |
|
27
27
|
| ofp_version | 4 |
|
28
28
|
| message_type | 2 |
|
29
|
-
|
|
29
|
+
| length | 8 |
|
30
30
|
| transaction_id | 123 |
|
31
31
|
| xid | 123 |
|
32
32
|
| body | |
|
@@ -42,7 +42,7 @@ Feature: Pio::Echo::Request
|
|
42
42
|
| field | value |
|
43
43
|
| ofp_version | 4 |
|
44
44
|
| message_type | 2 |
|
45
|
-
|
|
45
|
+
| length | 8 |
|
46
46
|
| transaction_id | 123 |
|
47
47
|
| xid | 123 |
|
48
48
|
| body | |
|
@@ -58,7 +58,7 @@ Feature: Pio::Echo::Request
|
|
58
58
|
| field | value |
|
59
59
|
| ofp_version | 4 |
|
60
60
|
| message_type | 2 |
|
61
|
-
|
|
61
|
+
| length | 25 |
|
62
62
|
| transaction_id | 0 |
|
63
63
|
| xid | 0 |
|
64
64
|
| body | echo request body |
|
@@ -74,7 +74,7 @@ Feature: Pio::Echo::Request
|
|
74
74
|
| field | value |
|
75
75
|
| ofp_version | 4 |
|
76
76
|
| message_type | 2 |
|
77
|
-
|
|
77
|
+
| length | 25 |
|
78
78
|
| transaction_id | 0 |
|
79
79
|
| xid | 0 |
|
80
80
|
| body | echo request body |
|
@@ -94,7 +94,7 @@ Feature: Pio::Echo::Request
|
|
94
94
|
| field | value |
|
95
95
|
| ofp_version | 4 |
|
96
96
|
| message_type | 2 |
|
97
|
-
|
|
97
|
+
| length | 8 |
|
98
98
|
| transaction_id | 0 |
|
99
99
|
| xid | 0 |
|
100
100
|
| body | |
|
@@ -107,7 +107,7 @@ Feature: Pio::Echo::Request
|
|
107
107
|
| field | value |
|
108
108
|
| ofp_version | 4 |
|
109
109
|
| message_type | 2 |
|
110
|
-
|
|
110
|
+
| length | 28 |
|
111
111
|
| transaction_id | 0 |
|
112
112
|
| xid | 0 |
|
113
113
|
| body | hogehogehogehogehoge |
|
@@ -15,7 +15,7 @@ Feature: Pio::Features::Reply
|
|
15
15
|
| field | value |
|
16
16
|
| ofp_version | 4 |
|
17
17
|
| message_type | 6 |
|
18
|
-
|
|
18
|
+
| length | 32 |
|
19
19
|
| transaction_id | 0 |
|
20
20
|
| xid | 0 |
|
21
21
|
| datapath_id | 291 |
|
@@ -33,7 +33,7 @@ Feature: Pio::Features::Reply
|
|
33
33
|
| field | value |
|
34
34
|
| ofp_version | 4 |
|
35
35
|
| message_type | 6 |
|
36
|
-
|
|
36
|
+
| length | 32 |
|
37
37
|
| transaction_id | 0 |
|
38
38
|
| xid | 0 |
|
39
39
|
| datapath_id | 281474976710657 |
|
@@ -7,13 +7,13 @@ Feature: Pio::Features::Request
|
|
7
7
|
"""
|
8
8
|
Then it should finish successfully
|
9
9
|
And the message has the following fields and values:
|
10
|
-
| field |
|
11
|
-
| ofp_version |
|
12
|
-
| message_type |
|
13
|
-
|
|
14
|
-
| transaction_id |
|
15
|
-
| xid |
|
16
|
-
| body |
|
10
|
+
| field | value |
|
11
|
+
| ofp_version | 4 |
|
12
|
+
| message_type | 5 |
|
13
|
+
| length | 8 |
|
14
|
+
| transaction_id | 0 |
|
15
|
+
| xid | 0 |
|
16
|
+
| body | |
|
17
17
|
|
18
18
|
Scenario: new(transaction_id: 123)
|
19
19
|
When I try to create an OpenFlow message with:
|
@@ -22,13 +22,13 @@ Feature: Pio::Features::Request
|
|
22
22
|
"""
|
23
23
|
Then it should finish successfully
|
24
24
|
And the message has the following fields and values:
|
25
|
-
| field |
|
26
|
-
| ofp_version |
|
27
|
-
| message_type |
|
28
|
-
|
|
29
|
-
| transaction_id |
|
30
|
-
| xid |
|
31
|
-
| body |
|
25
|
+
| field | value |
|
26
|
+
| ofp_version | 4 |
|
27
|
+
| message_type | 5 |
|
28
|
+
| length | 8 |
|
29
|
+
| transaction_id | 123 |
|
30
|
+
| xid | 123 |
|
31
|
+
| body | |
|
32
32
|
|
33
33
|
Scenario: new(xid: 123)
|
34
34
|
When I try to create an OpenFlow message with:
|
@@ -37,13 +37,13 @@ Feature: Pio::Features::Request
|
|
37
37
|
"""
|
38
38
|
Then it should finish successfully
|
39
39
|
And the message has the following fields and values:
|
40
|
-
| field |
|
41
|
-
| ofp_version |
|
42
|
-
| message_type |
|
43
|
-
|
|
44
|
-
| transaction_id |
|
45
|
-
| xid |
|
46
|
-
| body |
|
40
|
+
| field | value |
|
41
|
+
| ofp_version | 4 |
|
42
|
+
| message_type | 5 |
|
43
|
+
| length | 8 |
|
44
|
+
| transaction_id | 123 |
|
45
|
+
| xid | 123 |
|
46
|
+
| body | |
|
47
47
|
|
48
48
|
Scenario: new(unknown_attr: 'foo') and error
|
49
49
|
When I try to create an OpenFlow message with:
|
@@ -56,13 +56,13 @@ Feature: Pio::Features::Request
|
|
56
56
|
When I try to parse a file named "open_flow13/features_request.raw" with "Pio::Features::Request" class
|
57
57
|
Then it should finish successfully
|
58
58
|
And the message has the following fields and values:
|
59
|
-
| field |
|
60
|
-
| ofp_version |
|
61
|
-
| message_type |
|
62
|
-
|
|
63
|
-
| transaction_id |
|
64
|
-
| xid |
|
65
|
-
| body |
|
59
|
+
| field | value |
|
60
|
+
| ofp_version | 4 |
|
61
|
+
| message_type | 5 |
|
62
|
+
| length | 8 |
|
63
|
+
| transaction_id | 0 |
|
64
|
+
| xid | 0 |
|
65
|
+
| body | |
|
66
66
|
|
67
67
|
Scenario: parse error
|
68
68
|
When I try to parse a file named "open_flow10/hello.raw" with "Pio::Features::Request" class
|
@@ -7,26 +7,26 @@ Feature: Pio::FlowMod
|
|
7
7
|
"""
|
8
8
|
Then it should finish successfully
|
9
9
|
And the message has the following fields and values:
|
10
|
-
| field |
|
11
|
-
| ofp_version |
|
12
|
-
| message_type |
|
13
|
-
|
|
14
|
-
| to_binary.length |
|
15
|
-
| transaction_id |
|
16
|
-
| xid |
|
17
|
-
| cookie |
|
18
|
-
| cookie_mask |
|
19
|
-
| table_id |
|
20
|
-
| command |
|
21
|
-
| idle_timeout |
|
22
|
-
| hard_timeout |
|
23
|
-
| priority.to_hex |
|
24
|
-
| buffer_id |
|
25
|
-
| out_port |
|
26
|
-
| out_group |
|
27
|
-
| flags |
|
28
|
-
| match.match_fields |
|
29
|
-
| instructions |
|
10
|
+
| field | value |
|
11
|
+
| ofp_version | 4 |
|
12
|
+
| message_type | 14 |
|
13
|
+
| length | 56 |
|
14
|
+
| to_binary.length | 56 |
|
15
|
+
| transaction_id | 0 |
|
16
|
+
| xid | 0 |
|
17
|
+
| cookie | 0 |
|
18
|
+
| cookie_mask | 0 |
|
19
|
+
| table_id | 0 |
|
20
|
+
| command | :add |
|
21
|
+
| idle_timeout | 0 |
|
22
|
+
| hard_timeout | 0 |
|
23
|
+
| priority.to_hex | 0xffff |
|
24
|
+
| buffer_id | :no_buffer |
|
25
|
+
| out_port | :any |
|
26
|
+
| out_group | :any |
|
27
|
+
| flags | [] |
|
28
|
+
| match.match_fields | [] |
|
29
|
+
| instructions | [] |
|
30
30
|
|
31
31
|
Scenario: new(instructions: Pio::Apply.new(SendOutPort.new(1)))
|
32
32
|
When I try to create an OpenFlow message with:
|
@@ -38,7 +38,7 @@ Feature: Pio::FlowMod
|
|
38
38
|
| field | value |
|
39
39
|
| ofp_version | 4 |
|
40
40
|
| message_type | 14 |
|
41
|
-
|
|
41
|
+
| length | 80 |
|
42
42
|
| transaction_id | 0 |
|
43
43
|
| xid | 0 |
|
44
44
|
| cookie | 0 |
|
@@ -68,7 +68,7 @@ Feature: Pio::FlowMod
|
|
68
68
|
| field | value |
|
69
69
|
| ofp_version | 4 |
|
70
70
|
| message_type | 14 |
|
71
|
-
|
|
71
|
+
| length | 88 |
|
72
72
|
| transaction_id | 0 |
|
73
73
|
| xid | 0 |
|
74
74
|
| cookie | 0 |
|
@@ -95,7 +95,7 @@ Feature: Pio::FlowMod
|
|
95
95
|
| field | value |
|
96
96
|
| ofp_version | 4 |
|
97
97
|
| message_type | 14 |
|
98
|
-
|
|
98
|
+
| length | 56 |
|
99
99
|
| transaction_id | 0 |
|
100
100
|
| xid | 0 |
|
101
101
|
| cookie | 0 |
|
@@ -119,7 +119,7 @@ Feature: Pio::FlowMod
|
|
119
119
|
| field | value |
|
120
120
|
| ofp_version | 4 |
|
121
121
|
| message_type | 14 |
|
122
|
-
|
|
122
|
+
| length | 80 |
|
123
123
|
| transaction_id | 0 |
|
124
124
|
| xid | 0 |
|
125
125
|
| cookie | 0 |
|