pio 0.27.1 → 0.27.2
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/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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 804a0c37ec9414b35256fc56c916d748597d8073
|
4
|
+
data.tar.gz: b261a60ba818e6957e298f556d9403c7e3134478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6420fee8b7890cc9be86fa3947a2b72a83a2891d6987125c6c529552135cd79b80c7ec29ee661ba3eaa91d98f7c66bf26caf260e0bcbe7b5b07a843d8e7ceab4
|
7
|
+
data.tar.gz: c62452bb130675ce0fa50a47df61358b691d6726f42ee1dac64e23d58dd195971daf47c06470e39e28283794ae556bc0279d722363e5933c8443cbb2eaacb565
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
## develop (unreleased)
|
4
4
|
|
5
5
|
|
6
|
+
## 0.27.2 (10/25/2015)
|
7
|
+
### New features
|
8
|
+
* [#244](https://github.com/trema/pio/pull/244): Support ARP in `ExactMatch.new`.
|
9
|
+
|
10
|
+
### Changes
|
11
|
+
* [#242](https://github.com/trema/pio/issues/242): Fix `Parser#read` to avoid fail in parsing unsupported eth\_type frame.
|
12
|
+
|
13
|
+
|
6
14
|
## 0.27.1 (9/28/2015)
|
7
15
|
### Bugs fixed
|
8
16
|
* [#238](https://github.com/trema/pio/issues/238): `Features::Reply#datapath_id` doesn't return an Integer.
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# This file was generated by Bundler.
|
4
4
|
#
|
5
|
-
# The application '
|
5
|
+
# The application 'code_metrics' is installed as part of a gem, and
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
@@ -13,4 +13,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
|
13
13
|
require 'rubygems'
|
14
14
|
require 'bundler/setup'
|
15
15
|
|
16
|
-
load Gem.bin_path('
|
16
|
+
load Gem.bin_path('code_metrics', 'code_metrics')
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'code_metrics-profile' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('code_metrics', 'code_metrics-profile')
|
Binary file
|
@@ -10,7 +10,7 @@ Feature: Pio::AggregateStats::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 | :aggregate |
|
@@ -38,7 +38,7 @@ Feature: Pio::AggregateStats::Request
|
|
38
38
|
| field | value |
|
39
39
|
| ofp_version | 1 |
|
40
40
|
| message_type | 16 |
|
41
|
-
|
|
41
|
+
| message_length | 56 |
|
42
42
|
| transaction_id | 14 |
|
43
43
|
| xid | 14 |
|
44
44
|
| stats_type | :aggregate |
|
@@ -13,7 +13,7 @@ Feature: Pio::Error::BadRequest
|
|
13
13
|
| field | value |
|
14
14
|
| ofp_version | 1 |
|
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 | 1 |
|
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::Barrier::Reply
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 19 |
|
13
|
-
|
|
13
|
+
| message_length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| body | |
|
@@ -25,22 +25,7 @@ Feature: Pio::Barrier::Reply
|
|
25
25
|
| field | value |
|
26
26
|
| ofp_version | 1 |
|
27
27
|
| message_type | 19 |
|
28
|
-
|
|
29
|
-
| transaction_id | 123 |
|
30
|
-
| xid | 123 |
|
31
|
-
| body | |
|
32
|
-
|
33
|
-
Scenario: new(xid: 123)
|
34
|
-
When I try to create an OpenFlow message with:
|
35
|
-
"""
|
36
|
-
Pio::Barrier::Reply.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 | 19 |
|
43
|
-
| length | 8 |
|
28
|
+
| message_length | 8 |
|
44
29
|
| transaction_id | 123 |
|
45
30
|
| xid | 123 |
|
46
31
|
| body | |
|
@@ -52,7 +37,7 @@ Feature: Pio::Barrier::Reply
|
|
52
37
|
| field | value |
|
53
38
|
| ofp_version | 1 |
|
54
39
|
| message_type | 19 |
|
55
|
-
|
|
40
|
+
| message_length | 8 |
|
56
41
|
| transaction_id | 0 |
|
57
42
|
| xid | 0 |
|
58
43
|
| body | |
|
@@ -10,7 +10,7 @@ Feature: Pio::Barrier::Request
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 18 |
|
13
|
-
|
|
13
|
+
| message_length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| body | |
|
@@ -25,26 +25,11 @@ Feature: Pio::Barrier::Request
|
|
25
25
|
| field | value |
|
26
26
|
| ofp_version | 1 |
|
27
27
|
| message_type | 18 |
|
28
|
-
|
|
28
|
+
| message_length | 8 |
|
29
29
|
| transaction_id | 123 |
|
30
30
|
| xid | 123 |
|
31
31
|
| body | |
|
32
32
|
|
33
|
-
Scenario: new(xid: 123)
|
34
|
-
When I try to create an OpenFlow message with:
|
35
|
-
"""
|
36
|
-
Pio::Barrier::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 | 18 |
|
43
|
-
| length | 8 |
|
44
|
-
| transaction_id | 123 |
|
45
|
-
| xid | 123 |
|
46
|
-
| body | |
|
47
|
-
|
48
33
|
Scenario: read
|
49
34
|
When I try to parse a file named "open_flow10/barrier_request.raw" with "Barrier::Request" class
|
50
35
|
Then it should finish successfully
|
@@ -52,7 +37,7 @@ Feature: Pio::Barrier::Request
|
|
52
37
|
| field | value |
|
53
38
|
| ofp_version | 1 |
|
54
39
|
| message_type | 18 |
|
55
|
-
|
|
40
|
+
| message_length | 8 |
|
56
41
|
| transaction_id | 0 |
|
57
42
|
| xid | 0 |
|
58
43
|
| body | |
|
@@ -10,7 +10,7 @@ Feature: Pio::DescriptionStats::Request
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 16 |
|
13
|
-
|
|
13
|
+
| message_length | 12 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| stats_type | :description |
|
@@ -25,7 +25,7 @@ Feature: Pio::DescriptionStats::Request
|
|
25
25
|
| field | value |
|
26
26
|
| ofp_version | 1 |
|
27
27
|
| message_type | 16 |
|
28
|
-
|
|
28
|
+
| message_length | 12 |
|
29
29
|
| transaction_id | 123 |
|
30
30
|
| xid | 123 |
|
31
31
|
| stats_type | :description |
|
@@ -37,7 +37,7 @@ Feature: Pio::DescriptionStats::Request
|
|
37
37
|
| field | value |
|
38
38
|
| ofp_version | 1 |
|
39
39
|
| message_type | 16 |
|
40
|
-
|
|
40
|
+
| message_length | 12 |
|
41
41
|
| transaction_id | 12 |
|
42
42
|
| xid | 12 |
|
43
43
|
| stats_type | :description |
|
@@ -10,7 +10,7 @@ Feature: Pio::Echo::Reply
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 3 |
|
13
|
-
|
|
13
|
+
| message_length | 8 |
|
14
14
|
| transaction_id | 0 |
|
15
15
|
| xid | 0 |
|
16
16
|
| body | |
|
@@ -26,35 +26,12 @@ Feature: Pio::Echo::Reply
|
|
26
26
|
| field | value |
|
27
27
|
| ofp_version | 1 |
|
28
28
|
| message_type | 3 |
|
29
|
-
|
|
29
|
+
| message_length | 8 |
|
30
30
|
| transaction_id | 123 |
|
31
31
|
| xid | 123 |
|
32
32
|
| body | |
|
33
33
|
| user_data | |
|
34
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 | 1 |
|
44
|
-
| message_type | 3 |
|
45
|
-
| length | 8 |
|
46
|
-
| transaction_id | 123 |
|
47
|
-
| xid | 123 |
|
48
|
-
| body | |
|
49
|
-
| user_data | |
|
50
|
-
|
51
|
-
Scenario: new(unknown_attr: 'foo') and error
|
52
|
-
When I try to create an OpenFlow message with:
|
53
|
-
"""
|
54
|
-
Pio::Echo::Reply.new(unknown_attr: 'foo')
|
55
|
-
"""
|
56
|
-
Then it should fail with "RuntimeError", "Unknown option: unknown_attr"
|
57
|
-
|
58
35
|
Scenario: new(body: 'echo reply body')
|
59
36
|
When I try to create an OpenFlow message with:
|
60
37
|
"""
|
@@ -65,23 +42,7 @@ Feature: Pio::Echo::Reply
|
|
65
42
|
| field | value |
|
66
43
|
| ofp_version | 1 |
|
67
44
|
| message_type | 3 |
|
68
|
-
|
|
69
|
-
| transaction_id | 0 |
|
70
|
-
| xid | 0 |
|
71
|
-
| body | echo reply body |
|
72
|
-
| user_data | echo reply body |
|
73
|
-
|
74
|
-
Scenario: new(user_data: 'echo reply body')
|
75
|
-
When I try to create an OpenFlow message with:
|
76
|
-
"""
|
77
|
-
Pio::Echo::Reply.new(user_data: 'echo reply body')
|
78
|
-
"""
|
79
|
-
Then it should finish successfully
|
80
|
-
And the message has the following fields and values:
|
81
|
-
| field | value |
|
82
|
-
| ofp_version | 1 |
|
83
|
-
| message_type | 3 |
|
84
|
-
| length | 23 |
|
45
|
+
| message_length | 23 |
|
85
46
|
| transaction_id | 0 |
|
86
47
|
| xid | 0 |
|
87
48
|
| body | echo reply body |
|
@@ -94,12 +55,8 @@ Feature: Pio::Echo::Reply
|
|
94
55
|
| field | value |
|
95
56
|
| ofp_version | 1 |
|
96
57
|
| message_type | 3 |
|
97
|
-
|
|
58
|
+
| message_length | 8 |
|
98
59
|
| transaction_id | 6 |
|
99
60
|
| xid | 6 |
|
100
61
|
| body | |
|
101
62
|
| user_data | |
|
102
|
-
|
103
|
-
Scenario: parse error
|
104
|
-
When I try to parse a file named "open_flow10/features_reply.raw" with "Pio::Echo::Reply" class
|
105
|
-
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Echo Reply message."
|
@@ -10,7 +10,7 @@ Feature: Pio::Echo::Request
|
|
10
10
|
| field | value |
|
11
11
|
| ofp_version | 1 |
|
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 | 1 |
|
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 | 1 |
|
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 | 1 |
|
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 | 1 |
|
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 |
|
@@ -87,7 +55,7 @@ Feature: Pio::Echo::Request
|
|
87
55
|
| field | value |
|
88
56
|
| ofp_version | 1 |
|
89
57
|
| message_type | 2 |
|
90
|
-
|
|
58
|
+
| message_length | 8 |
|
91
59
|
| transaction_id | 0 |
|
92
60
|
| xid | 0 |
|
93
61
|
| body | |
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Feature: Pio::ExactMatch
|
2
2
|
Scenario: new (from ARP request Packet In)
|
3
3
|
When I create an exact match from "open_flow10/packet_in_arp_request.raw"
|
4
|
-
|
4
|
+
Then the message has the following fields and values:
|
5
5
|
| field | value |
|
6
6
|
| wildcards | {} |
|
7
7
|
| in_port | 1 |
|
@@ -17,9 +17,27 @@ Feature: Pio::ExactMatch
|
|
17
17
|
| transport_source_port | 0 |
|
18
18
|
| transport_destination_port | 0 |
|
19
19
|
|
20
|
+
Scenario: new (from ARP reply Packet In)
|
21
|
+
When I create an exact match from "open_flow10/packet_in_arp_reply.raw"
|
22
|
+
Then the message has the following fields and values:
|
23
|
+
| field | value |
|
24
|
+
| wildcards | {} |
|
25
|
+
| in_port | 1 |
|
26
|
+
| ether_source_address | 11:11:11:11:11:11 |
|
27
|
+
| ether_destination_address | 22:22:22:22:22:22 |
|
28
|
+
| vlan_vid | 65535 |
|
29
|
+
| vlan_priority | 0 |
|
30
|
+
| ether_type | 2054 |
|
31
|
+
| ip_tos | 0 |
|
32
|
+
| ip_protocol | 2 |
|
33
|
+
| ip_source_address | 192.168.0.1 |
|
34
|
+
| ip_destination_address | 192.168.0.2 |
|
35
|
+
| transport_source_port | 0 |
|
36
|
+
| transport_destination_port | 0 |
|
37
|
+
|
20
38
|
Scenario: new (from Cbench Packet In)
|
21
39
|
When I create an exact match from "open_flow10/packet_in_cbench.raw"
|
22
|
-
|
40
|
+
Then the message has the following fields and values:
|
23
41
|
| field | value |
|
24
42
|
| wildcards | {} |
|
25
43
|
| in_port | 1 |
|
@@ -4,14 +4,11 @@ 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
|
-
capabilities: [:flow_stats, :table_stats, :port_stats, :queue_stats,
|
11
|
-
|
12
|
-
actions: [:output, :set_vlan_vid, :set_vlan_pcp, :strip_vlan,
|
13
|
-
:set_ether_source_address, :set_ether_destination_address, :set_ip_source_address, :set_ip_destination_address,
|
14
|
-
:set_ip_tos, :set_transport_source_port, :set_transport_destination_port, :enqueue],
|
10
|
+
capabilities: [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip],
|
11
|
+
actions: [:output, :set_ether_source_address, :set_ether_destination_address],
|
15
12
|
ports: [{ port_no: 1,
|
16
13
|
hardware_address: '11:22:33:44:55:66',
|
17
14
|
name: 'port123',
|
@@ -22,74 +19,70 @@ Feature: Pio::Features::Reply
|
|
22
19
|
"""
|
23
20
|
Then it should finish successfully
|
24
21
|
And the message has the following fields and values:
|
25
|
-
| field
|
26
|
-
| ofp_version
|
27
|
-
| message_type
|
28
|
-
|
|
29
|
-
| transaction_id
|
30
|
-
| xid
|
31
|
-
| datapath_id
|
32
|
-
| dpid
|
33
|
-
| n_buffers
|
34
|
-
| n_tables
|
35
|
-
| capabilities
|
36
|
-
| actions
|
37
|
-
| ports.length
|
38
|
-
| ports.
|
39
|
-
| ports.
|
40
|
-
| ports.
|
41
|
-
| ports.
|
42
|
-
| ports.
|
43
|
-
| ports.
|
44
|
-
| ports.
|
45
|
-
| ports.
|
46
|
-
| ports.
|
47
|
-
| ports.
|
48
|
-
| ports.
|
22
|
+
| field | value |
|
23
|
+
| ofp_version | 1 |
|
24
|
+
| message_type | 6 |
|
25
|
+
| message_length | 80 |
|
26
|
+
| transaction_id | 0 |
|
27
|
+
| xid | 0 |
|
28
|
+
| datapath_id | 291 |
|
29
|
+
| dpid | 291 |
|
30
|
+
| n_buffers | 256 |
|
31
|
+
| n_tables | 254 |
|
32
|
+
| capabilities | [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip] |
|
33
|
+
| actions | [:output, :set_ether_source_address, :set_ether_destination_address] |
|
34
|
+
| ports.length | 1 |
|
35
|
+
| ports[0].datapath_id | 291 |
|
36
|
+
| ports[0].port_no | 1 |
|
37
|
+
| ports[0].mac_address | 11:22:33:44:55:66 |
|
38
|
+
| ports[0].hardware_address | 11:22:33:44:55:66 |
|
39
|
+
| ports[0].name | port123 |
|
40
|
+
| ports[0].config | [:port_down] |
|
41
|
+
| ports[0].state | [:link_down] |
|
42
|
+
| ports[0].curr | [:port_10gb_fd, :port_copper] |
|
43
|
+
| ports[0].advertised | [] |
|
44
|
+
| ports[0].supported | [] |
|
45
|
+
| ports[0].peer | [] |
|
49
46
|
|
50
47
|
Scenario: read
|
51
48
|
When I try to parse a file named "open_flow10/features_reply.raw" with "Features::Reply" class
|
52
49
|
Then it should finish successfully
|
53
50
|
And the message has the following fields and values:
|
54
|
-
| field
|
55
|
-
| ofp_version
|
56
|
-
| message_type
|
57
|
-
|
|
58
|
-
| transaction_id
|
59
|
-
| xid
|
60
|
-
| datapath_id
|
61
|
-
| dpid
|
62
|
-
| n_buffers
|
63
|
-
| n_tables
|
64
|
-
| capabilities
|
65
|
-
| actions
|
66
|
-
| ports.length
|
67
|
-
| ports.
|
68
|
-
| ports.
|
69
|
-
| ports.
|
70
|
-
| ports.
|
71
|
-
| ports.
|
72
|
-
| ports.
|
73
|
-
| ports.
|
74
|
-
| ports.
|
75
|
-
| ports.
|
76
|
-
| ports.
|
77
|
-
| ports.
|
78
|
-
| ports.
|
79
|
-
| ports.
|
80
|
-
| ports.
|
81
|
-
| ports.
|
82
|
-
| ports.
|
83
|
-
| ports.
|
84
|
-
| ports.
|
85
|
-
| ports.
|
86
|
-
| ports.
|
87
|
-
| ports.
|
88
|
-
| ports.
|
89
|
-
| ports.
|
90
|
-
| ports.
|
91
|
-
| ports.
|
92
|
-
|
93
|
-
Scenario: parse error
|
94
|
-
When I try to parse a file named "open_flow10/echo_reply.raw" with "Pio::Features::Reply" class
|
95
|
-
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Features Reply message."
|
51
|
+
| field | value |
|
52
|
+
| ofp_version | 1 |
|
53
|
+
| message_type | 6 |
|
54
|
+
| message_length | 176 |
|
55
|
+
| transaction_id | 2 |
|
56
|
+
| xid | 2 |
|
57
|
+
| datapath_id | 1 |
|
58
|
+
| dpid | 1 |
|
59
|
+
| n_buffers | 256 |
|
60
|
+
| n_tables | 1 |
|
61
|
+
| capabilities | [:flow_stats, :table_stats, :port_stats, :arp_match_ip] |
|
62
|
+
| 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] |
|
63
|
+
| ports.length | 3 |
|
64
|
+
| ports[0].datapath_id | 1 |
|
65
|
+
| ports[0].port_no | 2 |
|
66
|
+
| ports[0].mac_address | 16:7d:a4:37:ba:10 |
|
67
|
+
| ports[0].hardware_address | 16:7d:a4:37:ba:10 |
|
68
|
+
| ports[0].name | trema0-0 |
|
69
|
+
| ports[0].config | [] |
|
70
|
+
| ports[0].state | [] |
|
71
|
+
| ports[0].curr | [:port_10gb_fd, :port_copper] |
|
72
|
+
| ports[0].advertised | [] |
|
73
|
+
| ports[0].supported | [] |
|
74
|
+
| ports[0].peer | [] |
|
75
|
+
| ports[2].port_no | 1 |
|
76
|
+
| ports[2].number | 1 |
|
77
|
+
| ports[2].mac_address | 62:94:3a:f6:40:db |
|
78
|
+
| ports[2].hardware_address | 62:94:3a:f6:40:db |
|
79
|
+
| ports[2].name | trema1-0 |
|
80
|
+
| ports[2].config | [] |
|
81
|
+
| ports[2].state | [] |
|
82
|
+
| ports[2].curr | [:port_10gb_fd, :port_copper] |
|
83
|
+
| ports[2].advertised | [] |
|
84
|
+
| ports[2].supported | [] |
|
85
|
+
| ports[2].peer | [] |
|
86
|
+
| ports[2].up? | true |
|
87
|
+
| ports[2].down? | false |
|
88
|
+
| ports[2].local? | false |
|