pio 0.27.1 → 0.27.2
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/Rakefile +1 -1
- data/bin/{terminal-notifier → code_metrics} +2 -2
- data/bin/code_metrics-profile +16 -0
- data/features/icmpv6.pcap +0 -0
- data/features/open_flow10/aggregate_stats_reply.feature +1 -1
- data/features/open_flow10/aggregate_stats_request.feature +2 -2
- data/features/open_flow10/bad_request.feature +2 -2
- data/features/open_flow10/barrier_reply.feature +3 -18
- data/features/open_flow10/barrier_request.feature +3 -18
- data/features/open_flow10/description_stats_reply.feature +1 -1
- data/features/open_flow10/description_stats_request.feature +3 -3
- data/features/open_flow10/echo_reply.feature +4 -47
- data/features/open_flow10/echo_request.feature +4 -36
- data/features/open_flow10/exact_match.feature +20 -2
- data/features/open_flow10/features_reply.feature +65 -72
- data/features/open_flow10/features_request.feature +3 -22
- data/features/open_flow10/flow_mod.feature +5 -5
- data/features/open_flow10/flow_stats_reply.feature +2 -2
- data/features/open_flow10/flow_stats_request.feature +3 -4
- data/features/open_flow10/hello.feature +4 -20
- data/features/open_flow10/hello_failed.feature +4 -4
- data/features/open_flow10/packet_in.feature +2 -2
- data/features/open_flow10/packet_in_arp_reply.raw +0 -0
- data/features/open_flow10/packet_out.feature +1 -1
- data/features/open_flow10/port_status.feature +1 -1
- data/features/open_flow13/bad_request.feature +2 -2
- data/features/open_flow13/echo_reply.feature +5 -37
- data/features/open_flow13/echo_request.feature +5 -37
- data/features/open_flow13/features_reply.feature +3 -7
- data/features/open_flow13/features_request.feature +3 -18
- data/features/open_flow13/flow_mod.feature +5 -5
- data/features/open_flow13/hello.feature +4 -19
- data/features/open_flow13/hello_failed.feature +4 -4
- data/features/open_flow13/match.feature +4 -4
- data/features/open_flow13/packet_in.feature +3 -3
- data/features/open_flow13/packet_out.feature +3 -3
- data/features/parser.feature +10 -0
- data/lib/pio/arp/format.rb +20 -0
- data/lib/pio/ipv4_header.rb +20 -0
- data/lib/pio/open_flow.rb +0 -1
- data/lib/pio/open_flow/message.rb +51 -57
- data/lib/pio/open_flow/open_flow_header.rb +6 -10
- data/lib/pio/open_flow10.rb +20 -15
- data/lib/pio/open_flow10/aggregate_stats/reply.rb +20 -0
- data/lib/pio/open_flow10/aggregate_stats/request.rb +25 -0
- data/lib/pio/open_flow10/barrier/reply.rb +14 -0
- data/lib/pio/open_flow10/barrier/request.rb +14 -0
- data/lib/pio/open_flow10/description_stats/reply.rb +21 -0
- data/lib/pio/open_flow10/description_stats/request.rb +19 -0
- data/lib/pio/open_flow10/echo/reply.rb +16 -0
- data/lib/pio/open_flow10/echo/request.rb +16 -0
- data/lib/pio/open_flow10/error/bad_request.rb +27 -49
- data/lib/pio/open_flow10/error/hello_failed.rb +6 -28
- data/lib/pio/open_flow10/exact_match.rb +4 -39
- data/lib/pio/open_flow10/features/reply.rb +48 -72
- data/lib/pio/open_flow10/features/request.rb +4 -11
- data/lib/pio/open_flow10/flow_mod.rb +21 -51
- data/lib/pio/open_flow10/{flow_stats_reply.rb → flow_stats/reply.rb} +7 -23
- data/lib/pio/open_flow10/flow_stats/request.rb +25 -0
- data/lib/pio/open_flow10/hello.rb +3 -13
- data/lib/pio/open_flow10/match.rb +0 -18
- data/lib/pio/open_flow10/match10.rb +22 -0
- data/lib/pio/open_flow10/packet_in.rb +18 -42
- data/lib/pio/open_flow10/packet_out.rb +8 -31
- data/lib/pio/open_flow10/port_status.rb +11 -39
- data/lib/pio/open_flow10/stats_reply.rb +11 -8
- data/lib/pio/open_flow10/stats_request.rb +8 -8
- data/lib/pio/open_flow13.rb +13 -6
- data/lib/pio/open_flow13/echo/reply.rb +15 -0
- data/lib/pio/open_flow13/echo/request.rb +15 -0
- data/lib/pio/open_flow13/error/bad_request.rb +32 -49
- data/lib/pio/open_flow13/error/hello_failed.rb +7 -30
- data/lib/pio/open_flow13/features/reply.rb +27 -51
- data/lib/pio/open_flow13/features/request.rb +3 -10
- data/lib/pio/open_flow13/flow_mod.rb +29 -52
- data/lib/pio/open_flow13/hello.rb +18 -22
- data/lib/pio/open_flow13/packet_in.rb +26 -44
- data/lib/pio/open_flow13/packet_out.rb +16 -35
- data/lib/pio/open_flow13/stats_request.rb +5 -21
- data/lib/pio/parser.rb +5 -4
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +6 -6
- data/spec/pio/open_flow10/{echo_reply_spec.rb → echo/reply_spec.rb} +1 -1
- data/spec/pio/open_flow10/{echo_request_spec.rb → echo/request_spec.rb} +1 -1
- data/spec/pio/open_flow10/error/hello_failed_spec.rb +2 -2
- data/spec/pio/open_flow10/features/request_spec.rb +0 -5
- data/spec/pio/open_flow10/flow_mod_spec.rb +2 -4
- data/spec/pio/open_flow10/flow_stats_reply_spec.rb +1 -1
- data/spec/pio/open_flow10/flow_stats_request_spec.rb +2 -2
- data/spec/pio/open_flow10/packet_out_spec.rb +15 -18
- data/spec/pio/open_flow13/echo_reply_spec.rb +1 -1
- data/spec/pio/open_flow13/echo_request_spec.rb +1 -1
- data/spec/pio/open_flow13/error/hello_failed_spec.rb +2 -2
- data/spec/pio/open_flow13/features/request_spec.rb +5 -3
- data/spec/pio/open_flow13/hello_spec.rb +3 -3
- data/spec/support/shared_examples_for_openflow_messages.rb +5 -12
- metadata +92 -85
- data/lib/pio/open_flow/echo.rb +0 -44
- data/lib/pio/open_flow/format.rb +0 -46
- data/lib/pio/open_flow10/aggregate_stats_reply.rb +0 -38
- data/lib/pio/open_flow10/aggregate_stats_request.rb +0 -42
- data/lib/pio/open_flow10/barrier_reply.rb +0 -21
- data/lib/pio/open_flow10/barrier_request.rb +0 -22
- data/lib/pio/open_flow10/description_stats_reply.rb +0 -35
- data/lib/pio/open_flow10/description_stats_request.rb +0 -36
- data/lib/pio/open_flow10/echo.rb +0 -20
- data/lib/pio/open_flow10/flow_stats_request.rb +0 -64
- data/lib/pio/open_flow13/echo.rb +0 -20
- data/lib/pio/open_flow13/features.rb +0 -2
@@ -10,7 +10,7 @@ Feature: Pio::Features::Request
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 5 |
|
13
|
-
|
|
13
|
+
| message_length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| user_data | |
|
@@ -25,22 +25,7 @@ Feature: Pio::Features::Request
|
|
25
25
|
| field | value |
|
26
26
|
| ofp_version | 1 |
|
27
27
|
| message_type | 5 |
|
28
|
-
|
|
29
|
-
| transaction_id | 123 |
|
30
|
-
| xid | 123 |
|
31
|
-
| user_data | |
|
32
|
-
|
33
|
-
Scenario: new(xid: 123)
|
34
|
-
When I try to create an OpenFlow message with:
|
35
|
-
"""
|
36
|
-
Pio::Features::Request.new(xid: 123)
|
37
|
-
"""
|
38
|
-
Then it should finish successfully
|
39
|
-
And the message has the following fields and values:
|
40
|
-
| field | value |
|
41
|
-
| ofp_version | 1 |
|
42
|
-
| message_type | 5 |
|
43
|
-
| length | 8 |
|
28
|
+
| message_length | 8 |
|
44
29
|
| transaction_id | 123 |
|
45
30
|
| xid | 123 |
|
46
31
|
| user_data | |
|
@@ -52,11 +37,7 @@ Feature: Pio::Features::Request
|
|
52
37
|
| field | value |
|
53
38
|
| ofp_version | 1 |
|
54
39
|
| message_type | 5 |
|
55
|
-
|
|
40
|
+
| message_length | 8 |
|
56
41
|
| transaction_id | 2 |
|
57
42
|
| xid | 2 |
|
58
43
|
| user_data | |
|
59
|
-
|
60
|
-
Scenario: parse error
|
61
|
-
When I try to parse a file named "open_flow10/echo_request.raw" with "Pio::Features::Request" class
|
62
|
-
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Features Request message."
|
@@ -49,7 +49,7 @@ Feature: Pio::FlowMod
|
|
49
49
|
| field | value |
|
50
50
|
| ofp_version | 1 |
|
51
51
|
| message_type | 14 |
|
52
|
-
|
|
52
|
+
| message_length | 192 |
|
53
53
|
| transaction_id | 0 |
|
54
54
|
| xid | 0 |
|
55
55
|
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
@@ -86,7 +86,7 @@ Feature: Pio::FlowMod
|
|
86
86
|
| field | value |
|
87
87
|
| ofp_version | 1 |
|
88
88
|
| message_type | 14 |
|
89
|
-
|
|
89
|
+
| message_length | 192 |
|
90
90
|
| transaction_id | 0 |
|
91
91
|
| xid | 0 |
|
92
92
|
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
@@ -123,7 +123,7 @@ Feature: Pio::FlowMod
|
|
123
123
|
| field | value |
|
124
124
|
| ofp_version | 1 |
|
125
125
|
| message_type | 14 |
|
126
|
-
|
|
126
|
+
| message_length | 192 |
|
127
127
|
| transaction_id | 0 |
|
128
128
|
| xid | 0 |
|
129
129
|
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
@@ -160,7 +160,7 @@ Feature: Pio::FlowMod
|
|
160
160
|
| field | value |
|
161
161
|
| ofp_version | 1 |
|
162
162
|
| message_type | 14 |
|
163
|
-
|
|
163
|
+
| message_length | 72 |
|
164
164
|
| transaction_id | 0 |
|
165
165
|
| xid | 0 |
|
166
166
|
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
@@ -195,7 +195,7 @@ Feature: Pio::FlowMod
|
|
195
195
|
| field | value |
|
196
196
|
| ofp_version | 1 |
|
197
197
|
| message_type | 14 |
|
198
|
-
|
|
198
|
+
| message_length | 72 |
|
199
199
|
| transaction_id | 0 |
|
200
200
|
| xid | 0 |
|
201
201
|
| match.wildcards | {:ip_source_address=>24, :ip_destination_address=>24} |
|
@@ -10,7 +10,7 @@ Feature: Pio::FlowStats::Reply
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 17 |
|
13
|
-
|
|
13
|
+
| message_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
|
+
| message_length | 228 |
|
35
35
|
| transaction_id | 6 |
|
36
36
|
| xid | 6 |
|
37
37
|
| stats_type | :flow |
|
@@ -10,7 +10,7 @@ Feature: Pio::FlowStats::Request
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 16 |
|
13
|
-
|
|
13
|
+
| message_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
|
+
| message_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
|
+
| message_length | 56 |
|
72
72
|
| transaction_id | 13 |
|
73
73
|
| xid | 13 |
|
74
74
|
| stats_type | :flow |
|
@@ -87,4 +87,3 @@ Feature: Pio::FlowStats::Request
|
|
87
87
|
| match.wildcards.fetch(:vlan_vid) | true |
|
88
88
|
| table_id.to_hex | 0xff |
|
89
89
|
| out_port | :none |
|
90
|
-
|
@@ -7,14 +7,14 @@ Feature: Pio::Hello
|
|
7
7
|
Scenario: new
|
8
8
|
When I try to create an OpenFlow message with:
|
9
9
|
"""
|
10
|
-
Pio::Hello.new
|
10
|
+
Pio::OpenFlow10::Hello.new
|
11
11
|
"""
|
12
12
|
Then it should finish successfully
|
13
13
|
And the message has the following fields and values:
|
14
14
|
| field | value |
|
15
15
|
| ofp_version | 1 |
|
16
16
|
| message_type | 0 |
|
17
|
-
|
|
17
|
+
| message_length | 8 |
|
18
18
|
| transaction_id | 0 |
|
19
19
|
| xid | 0 |
|
20
20
|
| body | |
|
@@ -30,28 +30,12 @@ Feature: Pio::Hello
|
|
30
30
|
| field | value |
|
31
31
|
| ofp_version | 1 |
|
32
32
|
| message_type | 0 |
|
33
|
-
|
|
33
|
+
| message_length | 8 |
|
34
34
|
| transaction_id | 123 |
|
35
35
|
| xid | 123 |
|
36
36
|
| body | |
|
37
37
|
| user_data | |
|
38
38
|
|
39
|
-
Scenario: new(xid: 123)
|
40
|
-
When I try to create an OpenFlow message with:
|
41
|
-
"""
|
42
|
-
Pio::Hello.new(xid: 123)
|
43
|
-
"""
|
44
|
-
Then it should finish successfully
|
45
|
-
And the message has the following fields and values:
|
46
|
-
| field | value |
|
47
|
-
| ofp_version | 1 |
|
48
|
-
| message_type | 0 |
|
49
|
-
| length | 8 |
|
50
|
-
| transaction_id | 123 |
|
51
|
-
| xid | 123 |
|
52
|
-
| body | |
|
53
|
-
| user_data | |
|
54
|
-
|
55
39
|
Scenario: read
|
56
40
|
When I try to parse a file named "open_flow10/hello.raw" with "Hello" class
|
57
41
|
Then it should finish successfully
|
@@ -59,7 +43,7 @@ Feature: Pio::Hello
|
|
59
43
|
| field | value |
|
60
44
|
| ofp_version | 1 |
|
61
45
|
| message_type | 0 |
|
62
|
-
|
|
46
|
+
| message_length | 8 |
|
63
47
|
| transaction_id | 23 |
|
64
48
|
| xid | 23 |
|
65
49
|
| body | |
|
@@ -13,7 +13,7 @@ Feature: Pio::Error::HelloFailed
|
|
13
13
|
| field | value |
|
14
14
|
| ofp_version | 1 |
|
15
15
|
| message_type | 1 |
|
16
|
-
|
|
16
|
+
| message_length | 12 |
|
17
17
|
| transaction_id | 0 |
|
18
18
|
| xid | 0 |
|
19
19
|
| error_type | :hello_failed |
|
@@ -30,7 +30,7 @@ Feature: Pio::Error::HelloFailed
|
|
30
30
|
| field | value |
|
31
31
|
| ofp_version | 1 |
|
32
32
|
| message_type | 1 |
|
33
|
-
|
|
33
|
+
| message_length | 29 |
|
34
34
|
| transaction_id | 0 |
|
35
35
|
| xid | 0 |
|
36
36
|
| error_type | :hello_failed |
|
@@ -47,7 +47,7 @@ Feature: Pio::Error::HelloFailed
|
|
47
47
|
| field | value |
|
48
48
|
| ofp_version | 1 |
|
49
49
|
| message_type | 1 |
|
50
|
-
|
|
50
|
+
| message_length | 12 |
|
51
51
|
| transaction_id | 0 |
|
52
52
|
| xid | 0 |
|
53
53
|
| error_type | :hello_failed |
|
@@ -61,7 +61,7 @@ Feature: Pio::Error::HelloFailed
|
|
61
61
|
| field | value |
|
62
62
|
| ofp_version | 1 |
|
63
63
|
| message_type | 1 |
|
64
|
-
|
|
64
|
+
| message_length | 29 |
|
65
65
|
| transaction_id | 0 |
|
66
66
|
| xid | 0 |
|
67
67
|
| error_type | :hello_failed |
|
@@ -23,7 +23,7 @@ Feature: Pio::PacketIn
|
|
23
23
|
| field | value |
|
24
24
|
| ofp_version | 1 |
|
25
25
|
| message_type | 10 |
|
26
|
-
|
|
26
|
+
| message_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
|
+
| message_length | 78 |
|
47
47
|
| transaction_id | 0 |
|
48
48
|
| xid | 0 |
|
49
49
|
| buffer_id | 4294967040 |
|
Binary file
|
@@ -13,7 +13,7 @@ Feature: Pio::Error::BadRequest
|
|
13
13
|
| field | value |
|
14
14
|
| ofp_version | 4 |
|
15
15
|
| message_type | 1 |
|
16
|
-
|
|
16
|
+
| message_length | 20 |
|
17
17
|
| transaction_id | 0 |
|
18
18
|
| xid | 0 |
|
19
19
|
| error_type | :bad_request |
|
@@ -27,7 +27,7 @@ Feature: Pio::Error::BadRequest
|
|
27
27
|
| field | value |
|
28
28
|
| ofp_version | 4 |
|
29
29
|
| message_type | 1 |
|
30
|
-
|
|
30
|
+
| message_length | 20 |
|
31
31
|
| transaction_id | 0 |
|
32
32
|
| xid | 0 |
|
33
33
|
| error_type | :bad_request |
|
@@ -10,7 +10,7 @@ Feature: Pio::Echo::Reply
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 4 |
|
12
12
|
| message_type | 3 |
|
13
|
-
|
|
13
|
+
| message_length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| body | |
|
@@ -26,23 +26,7 @@ Feature: Pio::Echo::Reply
|
|
26
26
|
| field | value |
|
27
27
|
| ofp_version | 4 |
|
28
28
|
| message_type | 3 |
|
29
|
-
|
|
30
|
-
| transaction_id | 123 |
|
31
|
-
| xid | 123 |
|
32
|
-
| body | |
|
33
|
-
| user_data | |
|
34
|
-
|
35
|
-
Scenario: new(xid: 123)
|
36
|
-
When I try to create an OpenFlow message with:
|
37
|
-
"""
|
38
|
-
Pio::Echo::Reply.new(xid: 123)
|
39
|
-
"""
|
40
|
-
Then it should finish successfully
|
41
|
-
And the message has the following fields and values:
|
42
|
-
| field | value |
|
43
|
-
| ofp_version | 4 |
|
44
|
-
| message_type | 3 |
|
45
|
-
| length | 8 |
|
29
|
+
| message_length | 8 |
|
46
30
|
| transaction_id | 123 |
|
47
31
|
| xid | 123 |
|
48
32
|
| body | |
|
@@ -58,23 +42,7 @@ Feature: Pio::Echo::Reply
|
|
58
42
|
| field | value |
|
59
43
|
| ofp_version | 4 |
|
60
44
|
| message_type | 3 |
|
61
|
-
|
|
62
|
-
| transaction_id | 0 |
|
63
|
-
| xid | 0 |
|
64
|
-
| body | echo reply body |
|
65
|
-
| user_data | echo reply body |
|
66
|
-
|
67
|
-
Scenario: new(user_data: 'echo reply body')
|
68
|
-
When I try to create an OpenFlow message with:
|
69
|
-
"""
|
70
|
-
Pio::Echo::Reply.new(user_data: 'echo reply body')
|
71
|
-
"""
|
72
|
-
Then it should finish successfully
|
73
|
-
And the message has the following fields and values:
|
74
|
-
| field | value |
|
75
|
-
| ofp_version | 4 |
|
76
|
-
| message_type | 3 |
|
77
|
-
| length | 23 |
|
45
|
+
| message_length | 23 |
|
78
46
|
| transaction_id | 0 |
|
79
47
|
| xid | 0 |
|
80
48
|
| body | echo reply body |
|
@@ -94,7 +62,7 @@ Feature: Pio::Echo::Reply
|
|
94
62
|
| field | value |
|
95
63
|
| ofp_version | 4 |
|
96
64
|
| message_type | 3 |
|
97
|
-
|
|
65
|
+
| message_length | 8 |
|
98
66
|
| transaction_id | 0 |
|
99
67
|
| xid | 0 |
|
100
68
|
| body | |
|
@@ -107,7 +75,7 @@ Feature: Pio::Echo::Reply
|
|
107
75
|
| field | value |
|
108
76
|
| ofp_version | 4 |
|
109
77
|
| message_type | 3 |
|
110
|
-
|
|
78
|
+
| message_length | 28 |
|
111
79
|
| transaction_id | 0 |
|
112
80
|
| xid | 0 |
|
113
81
|
| 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
|
+
| message_length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| body | |
|
@@ -26,23 +26,7 @@ Feature: Pio::Echo::Request
|
|
26
26
|
| field | value |
|
27
27
|
| ofp_version | 4 |
|
28
28
|
| message_type | 2 |
|
29
|
-
|
|
30
|
-
| transaction_id | 123 |
|
31
|
-
| xid | 123 |
|
32
|
-
| body | |
|
33
|
-
| user_data | |
|
34
|
-
|
35
|
-
Scenario: new(xid: 123)
|
36
|
-
When I try to create an OpenFlow message with:
|
37
|
-
"""
|
38
|
-
Pio::Echo::Request.new(xid: 123)
|
39
|
-
"""
|
40
|
-
Then it should finish successfully
|
41
|
-
And the message has the following fields and values:
|
42
|
-
| field | value |
|
43
|
-
| ofp_version | 4 |
|
44
|
-
| message_type | 2 |
|
45
|
-
| length | 8 |
|
29
|
+
| message_length | 8 |
|
46
30
|
| transaction_id | 123 |
|
47
31
|
| xid | 123 |
|
48
32
|
| body | |
|
@@ -58,23 +42,7 @@ Feature: Pio::Echo::Request
|
|
58
42
|
| field | value |
|
59
43
|
| ofp_version | 4 |
|
60
44
|
| message_type | 2 |
|
61
|
-
|
|
62
|
-
| transaction_id | 0 |
|
63
|
-
| xid | 0 |
|
64
|
-
| body | echo request body |
|
65
|
-
| user_data | echo request body |
|
66
|
-
|
67
|
-
Scenario: new(user_data: 'echo request body')
|
68
|
-
When I try to create an OpenFlow message with:
|
69
|
-
"""
|
70
|
-
Pio::Echo::Request.new(user_data: 'echo request body')
|
71
|
-
"""
|
72
|
-
Then it should finish successfully
|
73
|
-
And the message has the following fields and values:
|
74
|
-
| field | value |
|
75
|
-
| ofp_version | 4 |
|
76
|
-
| message_type | 2 |
|
77
|
-
| length | 25 |
|
45
|
+
| message_length | 25 |
|
78
46
|
| transaction_id | 0 |
|
79
47
|
| xid | 0 |
|
80
48
|
| body | echo request body |
|
@@ -94,7 +62,7 @@ Feature: Pio::Echo::Request
|
|
94
62
|
| field | value |
|
95
63
|
| ofp_version | 4 |
|
96
64
|
| message_type | 2 |
|
97
|
-
|
|
65
|
+
| message_length | 8 |
|
98
66
|
| transaction_id | 0 |
|
99
67
|
| xid | 0 |
|
100
68
|
| body | |
|
@@ -107,7 +75,7 @@ Feature: Pio::Echo::Request
|
|
107
75
|
| field | value |
|
108
76
|
| ofp_version | 4 |
|
109
77
|
| message_type | 2 |
|
110
|
-
|
|
78
|
+
| message_length | 28 |
|
111
79
|
| transaction_id | 0 |
|
112
80
|
| xid | 0 |
|
113
81
|
| body | hogehogehogehogehoge |
|
@@ -4,7 +4,7 @@ Feature: Pio::Features::Reply
|
|
4
4
|
When I try to create an OpenFlow message with:
|
5
5
|
"""
|
6
6
|
Pio::Features::Reply.new(
|
7
|
-
|
7
|
+
datapath_id: 0x123,
|
8
8
|
n_buffers: 0x100,
|
9
9
|
n_tables: 0xfe,
|
10
10
|
capabilities: [:flow_stats, :table_stats, :port_stats, :group_stats, :ip_reasm, :queue_stats, :port_blocked]
|
@@ -15,7 +15,7 @@ Feature: Pio::Features::Reply
|
|
15
15
|
| field | value |
|
16
16
|
| ofp_version | 4 |
|
17
17
|
| message_type | 6 |
|
18
|
-
|
|
18
|
+
| message_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
|
+
| message_length | 32 |
|
37
37
|
| transaction_id | 0 |
|
38
38
|
| xid | 0 |
|
39
39
|
| datapath_id | 281474976710657 |
|
@@ -43,7 +43,3 @@ Feature: Pio::Features::Reply
|
|
43
43
|
| auxiliary_id | 0 |
|
44
44
|
| capabilities | [:flow_stats, :table_stats, :port_stats, :group_stats, :ip_reasm, :queue_stats, :port_blocked] |
|
45
45
|
| reserved | 0 |
|
46
|
-
|
47
|
-
Scenario: parse error
|
48
|
-
When I try to parse a file named "open_flow10/echo_request.raw" with "Pio::Features::Reply" class
|
49
|
-
Then it should fail with "Pio::ParseError", "Invalid OpenFlow13 Features Reply message."
|