pio 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -10,7 +10,7 @@ Feature: Pio::FlowStats::Reply
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 17 |
|
13
|
-
|
|
13
|
+
| length | 12 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| stats_type | :flow |
|
@@ -31,7 +31,7 @@ Feature: Pio::FlowStats::Reply
|
|
31
31
|
| field | value |
|
32
32
|
| ofp_version | 1 |
|
33
33
|
| message_type | 17 |
|
34
|
-
|
|
34
|
+
| length | 228 |
|
35
35
|
| transaction_id | 6 |
|
36
36
|
| xid | 6 |
|
37
37
|
| stats_type | :flow |
|
@@ -63,11 +63,11 @@ Feature: Pio::FlowStats::Reply
|
|
63
63
|
| stats[0].byte_count | 1000 |
|
64
64
|
| stats[0].actions.length | 2 |
|
65
65
|
| stats[0].actions[0].class | Pio::OpenFlow10::SendOutPort |
|
66
|
-
| stats[0].actions[0].
|
67
|
-
| stats[0].actions[0].
|
66
|
+
| stats[0].actions[0].port | 1 |
|
67
|
+
| stats[0].actions[0].max_length | 0 |
|
68
68
|
| stats[0].actions[1].class | Pio::OpenFlow10::SendOutPort |
|
69
|
-
| stats[0].actions[1].
|
70
|
-
| stats[0].actions[1].
|
69
|
+
| stats[0].actions[1].port | 2 |
|
70
|
+
| stats[0].actions[1].max_length | 0 |
|
71
71
|
| stats[1].entry_length | 112 |
|
72
72
|
| stats[1].table_id | 4 |
|
73
73
|
| stats[1].match.wildcards.keys.size | 14 |
|
@@ -95,11 +95,11 @@ Feature: Pio::FlowStats::Reply
|
|
95
95
|
| stats[1].byte_count | 1000 |
|
96
96
|
| stats[1].actions.length | 3 |
|
97
97
|
| stats[1].actions[0].class | Pio::OpenFlow10::SendOutPort |
|
98
|
-
| stats[1].actions[0].
|
99
|
-
| stats[1].actions[0].
|
98
|
+
| stats[1].actions[0].port | 1 |
|
99
|
+
| stats[1].actions[0].max_length | 0 |
|
100
100
|
| stats[1].actions[1].class | Pio::OpenFlow10::SendOutPort |
|
101
|
-
| stats[1].actions[1].
|
102
|
-
| stats[1].actions[1].
|
101
|
+
| stats[1].actions[1].port | 2 |
|
102
|
+
| stats[1].actions[1].max_length | 0 |
|
103
103
|
| stats[1].actions[2].class | Pio::OpenFlow10::SendOutPort |
|
104
|
-
| stats[1].actions[2].
|
105
|
-
| stats[1].actions[2].
|
104
|
+
| stats[1].actions[2].port | 3 |
|
105
|
+
| stats[1].actions[2].max_length | 0 |
|
@@ -10,7 +10,7 @@ Feature: Pio::FlowStats::Request
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 16 |
|
13
|
-
|
|
13
|
+
| length | 56 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| stats_type | :flow |
|
@@ -40,7 +40,7 @@ Feature: Pio::FlowStats::Request
|
|
40
40
|
| field | value |
|
41
41
|
| ofp_version | 1 |
|
42
42
|
| message_type | 16 |
|
43
|
-
|
|
43
|
+
| length | 56 |
|
44
44
|
| transaction_id | 0 |
|
45
45
|
| xid | 0 |
|
46
46
|
| stats_type | :flow |
|
@@ -68,7 +68,7 @@ Feature: Pio::FlowStats::Request
|
|
68
68
|
| field | value |
|
69
69
|
| ofp_version | 1 |
|
70
70
|
| message_type | 16 |
|
71
|
-
|
|
71
|
+
| length | 56 |
|
72
72
|
| transaction_id | 13 |
|
73
73
|
| xid | 13 |
|
74
74
|
| stats_type | :flow |
|
@@ -1,5 +1,9 @@
|
|
1
1
|
@open_flow10
|
2
2
|
Feature: Pio::Hello
|
3
|
+
|
4
|
+
Hello messages are exchanged between the switch and controller upon
|
5
|
+
connection startup.
|
6
|
+
|
3
7
|
Scenario: new
|
4
8
|
When I try to create an OpenFlow message with:
|
5
9
|
"""
|
@@ -10,7 +14,7 @@ Feature: Pio::Hello
|
|
10
14
|
| field | value |
|
11
15
|
| ofp_version | 1 |
|
12
16
|
| message_type | 0 |
|
13
|
-
|
|
17
|
+
| length | 8 |
|
14
18
|
| transaction_id | 0 |
|
15
19
|
| xid | 0 |
|
16
20
|
| body | |
|
@@ -26,7 +30,7 @@ Feature: Pio::Hello
|
|
26
30
|
| field | value |
|
27
31
|
| ofp_version | 1 |
|
28
32
|
| message_type | 0 |
|
29
|
-
|
|
33
|
+
| length | 8 |
|
30
34
|
| transaction_id | 123 |
|
31
35
|
| xid | 123 |
|
32
36
|
| body | |
|
@@ -42,19 +46,12 @@ Feature: Pio::Hello
|
|
42
46
|
| field | value |
|
43
47
|
| ofp_version | 1 |
|
44
48
|
| message_type | 0 |
|
45
|
-
|
|
49
|
+
| length | 8 |
|
46
50
|
| transaction_id | 123 |
|
47
51
|
| xid | 123 |
|
48
52
|
| body | |
|
49
53
|
| user_data | |
|
50
54
|
|
51
|
-
Scenario: new(unknown_attr: 'foo') and error
|
52
|
-
When I try to create an OpenFlow message with:
|
53
|
-
"""
|
54
|
-
Pio::Hello.new(unknown_attr: 'foo')
|
55
|
-
"""
|
56
|
-
Then it should fail with "RuntimeError", "Unknown option: unknown_attr"
|
57
|
-
|
58
55
|
Scenario: read
|
59
56
|
When I try to parse a file named "open_flow10/hello.raw" with "Hello" class
|
60
57
|
Then it should finish successfully
|
@@ -62,12 +59,8 @@ Feature: Pio::Hello
|
|
62
59
|
| field | value |
|
63
60
|
| ofp_version | 1 |
|
64
61
|
| message_type | 0 |
|
65
|
-
|
|
62
|
+
| length | 8 |
|
66
63
|
| transaction_id | 23 |
|
67
64
|
| xid | 23 |
|
68
65
|
| body | |
|
69
66
|
| user_data | |
|
70
|
-
|
71
|
-
Scenario: parse error
|
72
|
-
When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Hello" class
|
73
|
-
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Hello message."
|
@@ -0,0 +1,69 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::Error::HelloFailed
|
3
|
+
|
4
|
+
Hello protocol failed
|
5
|
+
|
6
|
+
Scenario: new
|
7
|
+
When I try to create an OpenFlow message with:
|
8
|
+
"""
|
9
|
+
Pio::Error::HelloFailed.new
|
10
|
+
"""
|
11
|
+
Then it should finish successfully
|
12
|
+
And the message has the following fields and values:
|
13
|
+
| field | value |
|
14
|
+
| ofp_version | 1 |
|
15
|
+
| message_type | 1 |
|
16
|
+
| length | 12 |
|
17
|
+
| transaction_id | 0 |
|
18
|
+
| xid | 0 |
|
19
|
+
| error_type | :hello_failed |
|
20
|
+
| error_code | :incompatible |
|
21
|
+
| description | |
|
22
|
+
|
23
|
+
Scenario: new(description: 'error description')
|
24
|
+
When I try to create an OpenFlow message with:
|
25
|
+
"""
|
26
|
+
Pio::Error::HelloFailed.new(description: 'error description')
|
27
|
+
"""
|
28
|
+
Then it should finish successfully
|
29
|
+
And the message has the following fields and values:
|
30
|
+
| field | value |
|
31
|
+
| ofp_version | 1 |
|
32
|
+
| message_type | 1 |
|
33
|
+
| length | 29 |
|
34
|
+
| transaction_id | 0 |
|
35
|
+
| xid | 0 |
|
36
|
+
| error_type | :hello_failed |
|
37
|
+
| error_code | :incompatible |
|
38
|
+
| description | error description |
|
39
|
+
|
40
|
+
Scenario: new(error_code: :permissions_error)
|
41
|
+
When I try to create an OpenFlow message with:
|
42
|
+
"""
|
43
|
+
Pio::Error::HelloFailed.new(error_code: :permissions_error)
|
44
|
+
"""
|
45
|
+
Then it should finish successfully
|
46
|
+
And the message has the following fields and values:
|
47
|
+
| field | value |
|
48
|
+
| ofp_version | 1 |
|
49
|
+
| message_type | 1 |
|
50
|
+
| length | 12 |
|
51
|
+
| transaction_id | 0 |
|
52
|
+
| xid | 0 |
|
53
|
+
| error_type | :hello_failed |
|
54
|
+
| error_code | :permissions_error |
|
55
|
+
| description | |
|
56
|
+
|
57
|
+
Scenario: read
|
58
|
+
When I try to parse a file named "open_flow10/hello_failed.raw" with "Pio::Error::HelloFailed" class
|
59
|
+
Then it should finish successfully
|
60
|
+
And the message has the following fields and values:
|
61
|
+
| field | value |
|
62
|
+
| ofp_version | 1 |
|
63
|
+
| message_type | 1 |
|
64
|
+
| length | 29 |
|
65
|
+
| transaction_id | 0 |
|
66
|
+
| xid | 0 |
|
67
|
+
| error_type | :hello_failed |
|
68
|
+
| error_code | :incompatible |
|
69
|
+
| description | error description |
|
Binary file
|
Binary file
|
@@ -23,7 +23,7 @@ Feature: Pio::PacketIn
|
|
23
23
|
| field | value |
|
24
24
|
| ofp_version | 1 |
|
25
25
|
| message_type | 10 |
|
26
|
-
|
|
26
|
+
| length | 78 |
|
27
27
|
| transaction_id | 0 |
|
28
28
|
| xid | 0 |
|
29
29
|
| buffer_id | 4294967040 |
|
@@ -43,7 +43,7 @@ Feature: Pio::PacketIn
|
|
43
43
|
| field | value |
|
44
44
|
| ofp_version | 1 |
|
45
45
|
| message_type | 10 |
|
46
|
-
|
|
46
|
+
| length | 78 |
|
47
47
|
| transaction_id | 0 |
|
48
48
|
| xid | 0 |
|
49
49
|
| buffer_id | 4294967040 |
|
@@ -4,16 +4,16 @@ Feature: Pio::PacketOut
|
|
4
4
|
When I try to parse a file named "open_flow10/packet_out.raw" with "PacketOut" class
|
5
5
|
Then it should finish successfully
|
6
6
|
And the message has the following fields and values:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
7
|
+
| field | value |
|
8
|
+
| ofp_version | 1 |
|
9
|
+
| message_type | 13 |
|
10
|
+
| length | 88 |
|
11
|
+
| transaction_id | 22 |
|
12
|
+
| xid | 22 |
|
13
|
+
| buffer_id | 4294967295 |
|
14
|
+
| in_port | 65535 |
|
15
|
+
| actions.length | 1 |
|
16
|
+
| actions.first.class | Pio::OpenFlow10::SendOutPort |
|
17
|
+
| actions.first.port | 2 |
|
18
|
+
| actions.first.max_length | 65535 |
|
19
|
+
| raw_data.length | 64 |
|
@@ -0,0 +1,106 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SendOutPort
|
3
|
+
|
4
|
+
Scenario: new(1)
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SendOutPort.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 | 0 |
|
13
|
+
| length | 8 |
|
14
|
+
| port | 1 |
|
15
|
+
| max_length | 65535 |
|
16
|
+
|
17
|
+
Scenario: new(:all)
|
18
|
+
When I try to create an OpenFlow action with:
|
19
|
+
"""
|
20
|
+
Pio::SendOutPort.new(:all)
|
21
|
+
"""
|
22
|
+
Then it should finish successfully
|
23
|
+
And the action has the following fields and values:
|
24
|
+
| field | value |
|
25
|
+
| action_type | 0 |
|
26
|
+
| length | 8 |
|
27
|
+
| port | :all |
|
28
|
+
| max_length | 65535 |
|
29
|
+
|
30
|
+
Scenario: new(:controller)
|
31
|
+
When I try to create an OpenFlow action with:
|
32
|
+
"""
|
33
|
+
Pio::SendOutPort.new(:controller)
|
34
|
+
"""
|
35
|
+
Then it should finish successfully
|
36
|
+
And the action has the following fields and values:
|
37
|
+
| field | value |
|
38
|
+
| action_type | 0 |
|
39
|
+
| length | 8 |
|
40
|
+
| port | :controller |
|
41
|
+
| max_length | 65535 |
|
42
|
+
|
43
|
+
Scenario: new(:local)
|
44
|
+
When I try to create an OpenFlow action with:
|
45
|
+
"""
|
46
|
+
Pio::SendOutPort.new(:local)
|
47
|
+
"""
|
48
|
+
Then it should finish successfully
|
49
|
+
And the action has the following fields and values:
|
50
|
+
| field | value |
|
51
|
+
| action_type | 0 |
|
52
|
+
| length | 8 |
|
53
|
+
| port | :local |
|
54
|
+
| max_length | 65535 |
|
55
|
+
|
56
|
+
Scenario: new(:table)
|
57
|
+
When I try to create an OpenFlow action with:
|
58
|
+
"""
|
59
|
+
Pio::SendOutPort.new(:table)
|
60
|
+
"""
|
61
|
+
Then it should finish successfully
|
62
|
+
And the action has the following fields and values:
|
63
|
+
| field | value |
|
64
|
+
| action_type | 0 |
|
65
|
+
| length | 8 |
|
66
|
+
| port | :table |
|
67
|
+
| max_length | 65535 |
|
68
|
+
|
69
|
+
Scenario: new(:in_port)
|
70
|
+
When I try to create an OpenFlow action with:
|
71
|
+
"""
|
72
|
+
Pio::SendOutPort.new(:in_port)
|
73
|
+
"""
|
74
|
+
Then it should finish successfully
|
75
|
+
And the action has the following fields and values:
|
76
|
+
| field | value |
|
77
|
+
| action_type | 0 |
|
78
|
+
| length | 8 |
|
79
|
+
| port | :in_port |
|
80
|
+
| max_length | 65535 |
|
81
|
+
|
82
|
+
Scenario: new(:normal)
|
83
|
+
When I try to create an OpenFlow action with:
|
84
|
+
"""
|
85
|
+
Pio::SendOutPort.new(:normal)
|
86
|
+
"""
|
87
|
+
Then it should finish successfully
|
88
|
+
And the action has the following fields and values:
|
89
|
+
| field | value |
|
90
|
+
| action_type | 0 |
|
91
|
+
| length | 8 |
|
92
|
+
| port | :normal |
|
93
|
+
| max_length | 65535 |
|
94
|
+
|
95
|
+
Scenario: new(:flood)
|
96
|
+
When I try to create an OpenFlow action with:
|
97
|
+
"""
|
98
|
+
Pio::SendOutPort.new(:flood)
|
99
|
+
"""
|
100
|
+
Then it should finish successfully
|
101
|
+
And the action has the following fields and values:
|
102
|
+
| field | value |
|
103
|
+
| action_type | 0 |
|
104
|
+
| length | 8 |
|
105
|
+
| port | :flood |
|
106
|
+
| max_length | 65535 |
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetEtherDestinationAddress
|
3
|
+
|
4
|
+
Scenario: new('11:22:33:44:55:66')
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetEtherDestinationAddress.new('11:22:33:44:55:66')
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 5 |
|
13
|
+
| length | 16 |
|
14
|
+
| mac_address | 11:22:33:44:55:66 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetEtherSourceAddress
|
3
|
+
|
4
|
+
Scenario: new('11:22:33:44:55:66')
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetEtherSourceAddress.new('11:22:33:44:55:66')
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 4 |
|
13
|
+
| length | 16 |
|
14
|
+
| mac_address | 11:22:33:44:55:66 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetIpDestinationAddress
|
3
|
+
|
4
|
+
Scenario: new('192.168.0.1')
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetIpDestinationAddress.new('192.168.0.1')
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 7 |
|
13
|
+
| length | 8 |
|
14
|
+
| ip_address | 192.168.0.1 |
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@open_flow10
|
2
|
+
Feature: Pio::SetIpSourceAddress
|
3
|
+
|
4
|
+
Scenario: new('192.168.0.1')
|
5
|
+
When I try to create an OpenFlow action with:
|
6
|
+
"""
|
7
|
+
Pio::SetIpSourceAddress.new('192.168.0.1')
|
8
|
+
"""
|
9
|
+
Then it should finish successfully
|
10
|
+
And the action has the following fields and values:
|
11
|
+
| field | value |
|
12
|
+
| action_type | 6 |
|
13
|
+
| length | 8 |
|
14
|
+
| ip_address | 192.168.0.1 |
|
15
|
+
|
16
|
+
|