pio 0.23.1 → 0.24.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 +16 -0
- data/README.md +2 -0
- data/Rakefile +1 -1
- data/features/open_flow10/barrier_reply.feature +58 -0
- data/features/open_flow10/barrier_request.feature +58 -0
- data/features/open_flow10/echo_reply.feature +50 -40
- data/features/open_flow10/echo_request.feature +54 -51
- data/features/open_flow10/features_reply.feature +62 -63
- data/features/open_flow10/features_request.feature +2 -19
- data/features/open_flow10/flow_mod.feature +1 -0
- data/features/open_flow10/hello.feature +38 -44
- data/features/open_flow10/packet_in.feature +1 -2
- data/features/open_flow10/packet_in.raw +0 -0
- data/features/open_flow10/packet_out.feature +14 -14
- data/features/open_flow10/port_status.feature +17 -17
- data/features/open_flow13/apply_actions.feature +15 -17
- data/features/open_flow13/echo_reply.feature +58 -58
- data/features/open_flow13/echo_request.feature +58 -58
- data/features/open_flow13/features_reply.feature +2 -6
- data/features/open_flow13/features_request.feature +3 -23
- data/features/open_flow13/flow_mod.feature +86 -93
- data/features/open_flow13/goto_table.feature +4 -4
- data/features/open_flow13/hello.feature +8 -15
- data/features/open_flow13/match.feature +14 -3
- data/features/open_flow13/meter.feature +3 -3
- data/features/open_flow13/oxm_experimenter_stratos_basic_dot11.raw +0 -0
- data/features/open_flow13/oxm_invalid_field.raw +0 -0
- data/features/open_flow13/packet_in.feature +15 -20
- data/features/open_flow13/packet_out.feature +39 -42
- data/features/open_flow13/send_out_port.feature +1 -5
- data/features/open_flow13/write_metadata.feature +3 -3
- data/features/open_flow_read.feature +43 -0
- data/features/open_flow_version.feature +10 -0
- data/features/step_definitions/open_flow_steps.rb +10 -2
- data/features/step_definitions/packet_data_steps.rb +4 -0
- data/features/support/hooks.rb +7 -0
- data/lib/pio.rb +1 -1
- data/lib/pio/monkey_patch/integer/ranges.rb +4 -0
- data/lib/pio/open_flow.rb +54 -16
- data/lib/pio/open_flow/datapath_id.rb +26 -0
- data/lib/pio/open_flow/echo.rb +44 -0
- data/lib/pio/open_flow/format.rb +45 -0
- data/lib/pio/open_flow/message.rb +88 -0
- data/lib/pio/open_flow/open_flow_header.rb +0 -14
- data/lib/pio/open_flow10.rb +3 -8
- data/lib/pio/open_flow10/actions.rb +1 -1
- data/lib/pio/open_flow10/barrier_reply.rb +21 -0
- data/lib/pio/open_flow10/barrier_request.rb +22 -0
- data/lib/pio/open_flow10/echo.rb +15 -11
- data/lib/pio/open_flow10/features.rb +99 -71
- data/lib/pio/open_flow10/flow_mod.rb +73 -66
- data/lib/pio/open_flow10/hello.rb +19 -4
- data/lib/pio/open_flow10/match.rb +133 -131
- data/lib/pio/open_flow10/packet_in.rb +55 -49
- data/lib/pio/open_flow10/packet_out.rb +31 -24
- data/lib/pio/open_flow10/port_status.rb +54 -27
- data/lib/pio/open_flow10/send_out_port.rb +66 -64
- data/lib/pio/open_flow13.rb +0 -15
- data/lib/pio/open_flow13/echo.rb +11 -68
- data/lib/pio/open_flow13/features_reply.rb +48 -77
- data/lib/pio/open_flow13/features_request.rb +16 -45
- data/lib/pio/open_flow13/flow_mod.rb +125 -148
- data/lib/pio/open_flow13/goto_table.rb +1 -0
- data/lib/pio/open_flow13/hello.rb +54 -84
- data/lib/pio/open_flow13/match.rb +69 -11
- data/lib/pio/open_flow13/meter.rb +1 -0
- data/lib/pio/open_flow13/packet_in.rb +38 -50
- data/lib/pio/open_flow13/packet_out.rb +50 -75
- data/lib/pio/open_flow13/send_out_port.rb +34 -34
- data/lib/pio/open_flow13/write_metadata.rb +1 -0
- data/lib/pio/parser.rb +3 -0
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +6 -6
- data/spec/pio/open_flow10/echo_reply_spec.rb +7 -0
- data/spec/pio/open_flow10/echo_request_spec.rb +7 -0
- data/spec/pio/open_flow10/features_reply_spec.rb +8 -0
- data/spec/pio/open_flow10/features_request_spec.rb +13 -0
- data/spec/pio/open_flow10/flow_mod_spec.rb +17 -16
- data/spec/pio/open_flow10/hello_spec.rb +7 -0
- data/spec/pio/open_flow10/match_spec.rb +8 -6
- data/spec/pio/open_flow10/packet_in_spec.rb +14 -0
- data/spec/pio/open_flow10/packet_out_spec.rb +21 -14
- data/spec/pio/open_flow10/send_out_port_spec.rb +4 -4
- data/spec/pio/open_flow10/wildcards_spec.rb +2 -2
- data/spec/pio/open_flow13/echo_reply_spec.rb +7 -0
- data/spec/pio/open_flow13/echo_request_spec.rb +7 -0
- data/spec/pio/open_flow13/features_reply_spec.rb +8 -0
- data/spec/pio/open_flow13/features_request_spec.rb +13 -0
- data/spec/pio/open_flow13/hello_spec.rb +14 -59
- data/spec/pio/open_flow13/packet_in_spec.rb +14 -0
- data/spec/pio/open_flow13/packet_out_spec.rb +7 -0
- data/spec/pio/open_flow_spec.rb +34 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/support/shared_examples_for_openflow_messages.rb +75 -0
- metadata +215 -170
- data/bin/byebug +0 -16
- data/bin/terminal-notifier +0 -16
- data/lib/pio/open_flow10/message.rb +0 -78
- data/spec/pio/open_flow/type_spec.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef1bd0a6c467983ccca7761a5672cf8dce7e5136
|
|
4
|
+
data.tar.gz: d7a9f2fbf5f25f5d00d6663ef9ad02db9c362295
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07895e734c22b8802e9c9761534fced81cdaa80100486dca3ff9d11abf4c577f61a9bad7aac1de0e560ea34176bd77d2e71cf6f73158cf76da8a6dcb9a6a4055
|
|
7
|
+
data.tar.gz: f1c35e1cb7726c0048b331595f30e4b12f6e961bdf489851c46f7174d550a2736d2d4b9fc3c3f9b6672964f4b7411ccbf25fbf847942b5a7b5e267d4cfd16211
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
## develop (unreleased)
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
## 0.24.0 (8/1/2015)
|
|
7
|
+
### New features
|
|
8
|
+
* [#201](https://github.com/trema/pio/pull/201): Add oxm experimenter support (OpenFlow1.3).
|
|
9
|
+
* [#202](https://github.com/trema/pio/pull/202): Add `Pio::OpenFlow.switch_version` method.
|
|
10
|
+
* [#205](https://github.com/trema/pio/pull/205): Add new classes `Pio::OpenFlow10::Barrier::Request`, `Pio::OpenFlow10::Barrier::Reply`.
|
|
11
|
+
* [#207](https://github.com/trema/pio/pull/207): Add new method `Pio::OpenFlow.read`
|
|
12
|
+
|
|
13
|
+
### Bugs fixed
|
|
14
|
+
* [#188](https://github.com/trema/pio/pull/188): Add PacketIn#in_port (OpenFlow1.3).
|
|
15
|
+
* [#189](https://github.com/trema/pio/pull/189): Add PacketIn#datapath_id= (OpenFlow1.3).
|
|
16
|
+
* [#190](https://github.com/trema/pio/pull/190): Add PacketOut#to_binary (OpenFlow1.3).
|
|
17
|
+
* [#191](https://github.com/trema/pio/pull/191): Add GotoTable#to_binary_s.
|
|
18
|
+
* [#192](https://github.com/trema/pio/pull/192): Add Meter#to_binary_s.
|
|
19
|
+
* [#193](https://github.com/trema/pio/pull/193): Add WriteMetadata#to_binary_s.
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## 0.23.1 (6/30/2015)
|
|
7
23
|
### Bugs fixed
|
|
8
24
|
* [#186](https://github.com/trema/pio/issues/186): Add the missing `FlowMod#to_binary` method.
|
data/README.md
CHANGED
|
@@ -29,6 +29,8 @@ supports the following packet formats:
|
|
|
29
29
|
- [Flow Mod](https://relishapp.com/trema/pio/docs/open-flow10/pio-flowmod)
|
|
30
30
|
- [Port Status](https://relishapp.com/trema/pio/docs/open-flow10/pio-portstatus)
|
|
31
31
|
- [Exact Match](https://relishapp.com/trema/pio/docs/open-flow10/pio-exactmatch)
|
|
32
|
+
- [Barrier Request](https://relishapp.com/trema/pio/docs/open-flow10/pio-barrier-request)
|
|
33
|
+
- [Barrier Reply](https://relishapp.com/trema/pio/docs/open-flow10/pio-barrier-reply)
|
|
32
34
|
- OpenFlow 1.3
|
|
33
35
|
- [Hello](https://relishapp.com/trema/pio/docs/open-flow13/pio-hello)
|
|
34
36
|
- [Echo Request](https://relishapp.com/trema/pio/docs/open-flow13/pio-echo-request)
|
data/Rakefile
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@open_flow10
|
|
2
|
+
Feature: Pio::Barrier::Reply
|
|
3
|
+
Scenario: new
|
|
4
|
+
When I try to create an OpenFlow message with:
|
|
5
|
+
"""
|
|
6
|
+
Pio::Barrier::Reply.new
|
|
7
|
+
"""
|
|
8
|
+
Then it should finish successfully
|
|
9
|
+
And the message have the following fields and values:
|
|
10
|
+
| field | value |
|
|
11
|
+
| ofp_version | 1 |
|
|
12
|
+
| message_type | 19 |
|
|
13
|
+
| message_length | 8 |
|
|
14
|
+
| transaction_id | 0 |
|
|
15
|
+
| xid | 0 |
|
|
16
|
+
| body | |
|
|
17
|
+
|
|
18
|
+
Scenario: new(transaction_id: 123)
|
|
19
|
+
When I try to create an OpenFlow message with:
|
|
20
|
+
"""
|
|
21
|
+
Pio::Barrier::Reply.new(transaction_id: 123)
|
|
22
|
+
"""
|
|
23
|
+
Then it should finish successfully
|
|
24
|
+
And the message have the following fields and values:
|
|
25
|
+
| field | value |
|
|
26
|
+
| ofp_version | 1 |
|
|
27
|
+
| message_type | 19 |
|
|
28
|
+
| message_length | 8 |
|
|
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 have the following fields and values:
|
|
40
|
+
| field | value |
|
|
41
|
+
| ofp_version | 1 |
|
|
42
|
+
| message_type | 19 |
|
|
43
|
+
| message_length | 8 |
|
|
44
|
+
| transaction_id | 123 |
|
|
45
|
+
| xid | 123 |
|
|
46
|
+
| body | |
|
|
47
|
+
|
|
48
|
+
Scenario: read
|
|
49
|
+
When I try to parse a file named "open_flow10/barrier_reply.raw" with "Barrier::Reply" class
|
|
50
|
+
Then it should finish successfully
|
|
51
|
+
And the message have the following fields and values:
|
|
52
|
+
| field | value |
|
|
53
|
+
| ofp_version | 1 |
|
|
54
|
+
| message_type | 19 |
|
|
55
|
+
| message_length | 8 |
|
|
56
|
+
| transaction_id | 0 |
|
|
57
|
+
| xid | 0 |
|
|
58
|
+
| body | |
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@open_flow10
|
|
2
|
+
Feature: Pio::Barrier::Request
|
|
3
|
+
Scenario: new
|
|
4
|
+
When I try to create an OpenFlow message with:
|
|
5
|
+
"""
|
|
6
|
+
Pio::Barrier::Request.new
|
|
7
|
+
"""
|
|
8
|
+
Then it should finish successfully
|
|
9
|
+
And the message have the following fields and values:
|
|
10
|
+
| field | value |
|
|
11
|
+
| ofp_version | 1 |
|
|
12
|
+
| message_type | 18 |
|
|
13
|
+
| message_length | 8 |
|
|
14
|
+
| transaction_id | 0 |
|
|
15
|
+
| xid | 0 |
|
|
16
|
+
| body | |
|
|
17
|
+
|
|
18
|
+
Scenario: new(transaction_id: 123)
|
|
19
|
+
When I try to create an OpenFlow message with:
|
|
20
|
+
"""
|
|
21
|
+
Pio::Barrier::Request.new(transaction_id: 123)
|
|
22
|
+
"""
|
|
23
|
+
Then it should finish successfully
|
|
24
|
+
And the message have the following fields and values:
|
|
25
|
+
| field | value |
|
|
26
|
+
| ofp_version | 1 |
|
|
27
|
+
| message_type | 18 |
|
|
28
|
+
| message_length | 8 |
|
|
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::Request.new(xid: 123)
|
|
37
|
+
"""
|
|
38
|
+
Then it should finish successfully
|
|
39
|
+
And the message have the following fields and values:
|
|
40
|
+
| field | value |
|
|
41
|
+
| ofp_version | 1 |
|
|
42
|
+
| message_type | 18 |
|
|
43
|
+
| message_length | 8 |
|
|
44
|
+
| transaction_id | 123 |
|
|
45
|
+
| xid | 123 |
|
|
46
|
+
| body | |
|
|
47
|
+
|
|
48
|
+
Scenario: read
|
|
49
|
+
When I try to parse a file named "open_flow10/barrier_request.raw" with "Barrier::Request" class
|
|
50
|
+
Then it should finish successfully
|
|
51
|
+
And the message have the following fields and values:
|
|
52
|
+
| field | value |
|
|
53
|
+
| ofp_version | 1 |
|
|
54
|
+
| message_type | 18 |
|
|
55
|
+
| message_length | 8 |
|
|
56
|
+
| transaction_id | 0 |
|
|
57
|
+
| xid | 0 |
|
|
58
|
+
| body | |
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@open_flow10
|
|
1
2
|
Feature: Pio::Echo::Reply
|
|
2
3
|
Scenario: new
|
|
3
4
|
When I try to create an OpenFlow message with:
|
|
@@ -6,14 +7,14 @@ Feature: Pio::Echo::Reply
|
|
|
6
7
|
"""
|
|
7
8
|
Then it should finish successfully
|
|
8
9
|
And the message have the following fields and values:
|
|
9
|
-
| field |
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| user_data |
|
|
10
|
+
| field | value |
|
|
11
|
+
| ofp_version | 1 |
|
|
12
|
+
| message_type | 3 |
|
|
13
|
+
| message_length | 8 |
|
|
14
|
+
| transaction_id | 0 |
|
|
15
|
+
| xid | 0 |
|
|
16
|
+
| body | |
|
|
17
|
+
| user_data | |
|
|
17
18
|
|
|
18
19
|
Scenario: new(transaction_id: 123)
|
|
19
20
|
When I try to create an OpenFlow message with:
|
|
@@ -22,14 +23,14 @@ Feature: Pio::Echo::Reply
|
|
|
22
23
|
"""
|
|
23
24
|
Then it should finish successfully
|
|
24
25
|
And the message have the following fields and values:
|
|
25
|
-
| field |
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
| user_data |
|
|
26
|
+
| field | value |
|
|
27
|
+
| ofp_version | 1 |
|
|
28
|
+
| message_type | 3 |
|
|
29
|
+
| message_length | 8 |
|
|
30
|
+
| transaction_id | 123 |
|
|
31
|
+
| xid | 123 |
|
|
32
|
+
| body | |
|
|
33
|
+
| user_data | |
|
|
33
34
|
|
|
34
35
|
Scenario: new(xid: 123)
|
|
35
36
|
When I try to create an OpenFlow message with:
|
|
@@ -38,28 +39,37 @@ Feature: Pio::Echo::Reply
|
|
|
38
39
|
"""
|
|
39
40
|
Then it should finish successfully
|
|
40
41
|
And the message have the following fields and values:
|
|
41
|
-
| field |
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
| user_data |
|
|
42
|
+
| field | value |
|
|
43
|
+
| ofp_version | 1 |
|
|
44
|
+
| message_type | 3 |
|
|
45
|
+
| message_length | 8 |
|
|
46
|
+
| transaction_id | 123 |
|
|
47
|
+
| xid | 123 |
|
|
48
|
+
| body | |
|
|
49
|
+
| user_data | |
|
|
49
50
|
|
|
50
|
-
Scenario: new(
|
|
51
|
+
Scenario: new(unknown_attr: 'foo') and error
|
|
51
52
|
When I try to create an OpenFlow message with:
|
|
52
53
|
"""
|
|
53
|
-
Pio::Echo::Reply.new(
|
|
54
|
+
Pio::Echo::Reply.new(unknown_attr: 'foo')
|
|
54
55
|
"""
|
|
55
|
-
Then it should fail with "
|
|
56
|
+
Then it should fail with "RuntimeError", "Unknown option: unknown_attr"
|
|
56
57
|
|
|
57
|
-
Scenario: new(
|
|
58
|
+
Scenario: new(body: 'echo reply body')
|
|
58
59
|
When I try to create an OpenFlow message with:
|
|
59
60
|
"""
|
|
60
|
-
Pio::Echo::Reply.new(
|
|
61
|
+
Pio::Echo::Reply.new(body: 'echo reply body')
|
|
61
62
|
"""
|
|
62
|
-
Then it should
|
|
63
|
+
Then it should finish successfully
|
|
64
|
+
And the message have the following fields and values:
|
|
65
|
+
| field | value |
|
|
66
|
+
| ofp_version | 1 |
|
|
67
|
+
| message_type | 3 |
|
|
68
|
+
| message_length | 23 |
|
|
69
|
+
| transaction_id | 0 |
|
|
70
|
+
| xid | 0 |
|
|
71
|
+
| body | echo reply body |
|
|
72
|
+
| user_data | echo reply body |
|
|
63
73
|
|
|
64
74
|
Scenario: new(user_data: 'echo reply body')
|
|
65
75
|
When I try to create an OpenFlow message with:
|
|
@@ -68,28 +78,28 @@ Feature: Pio::Echo::Reply
|
|
|
68
78
|
"""
|
|
69
79
|
Then it should finish successfully
|
|
70
80
|
And the message have the following fields and values:
|
|
71
|
-
| field |
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| user_data |
|
|
81
|
+
| field | value |
|
|
82
|
+
| ofp_version | 1 |
|
|
83
|
+
| message_type | 3 |
|
|
84
|
+
| message_length | 23 |
|
|
85
|
+
| transaction_id | 0 |
|
|
86
|
+
| xid | 0 |
|
|
87
|
+
| body | echo reply body |
|
|
88
|
+
| user_data | echo reply body |
|
|
79
89
|
|
|
80
90
|
Scenario: read (no message body)
|
|
81
91
|
When I try to parse a file named "open_flow10/echo_reply.raw" with "Pio::Echo::Reply" class
|
|
82
92
|
Then it should finish successfully
|
|
83
93
|
And the message have the following fields and values:
|
|
84
94
|
| field | value |
|
|
85
|
-
| class | Pio::Echo::Reply |
|
|
86
95
|
| ofp_version | 1 |
|
|
87
96
|
| message_type | 3 |
|
|
88
97
|
| message_length | 8 |
|
|
89
98
|
| transaction_id | 6 |
|
|
90
99
|
| xid | 6 |
|
|
100
|
+
| body | |
|
|
91
101
|
| user_data | |
|
|
92
102
|
|
|
93
103
|
Scenario: parse error
|
|
94
104
|
When I try to parse a file named "open_flow10/features_reply.raw" with "Pio::Echo::Reply" class
|
|
95
|
-
Then it should fail with "Pio::ParseError", "Invalid Echo Reply message."
|
|
105
|
+
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Echo Reply message."
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@open_flow10
|
|
1
2
|
Feature: Pio::Echo::Request
|
|
2
3
|
Scenario: new
|
|
3
4
|
When I try to create an OpenFlow message with:
|
|
@@ -6,14 +7,14 @@ Feature: Pio::Echo::Request
|
|
|
6
7
|
"""
|
|
7
8
|
Then it should finish successfully
|
|
8
9
|
And the message have the following fields and values:
|
|
9
|
-
| field |
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| user_data |
|
|
10
|
+
| field | value |
|
|
11
|
+
| ofp_version | 1 |
|
|
12
|
+
| message_type | 2 |
|
|
13
|
+
| message_length | 8 |
|
|
14
|
+
| transaction_id | 0 |
|
|
15
|
+
| xid | 0 |
|
|
16
|
+
| body | |
|
|
17
|
+
| user_data | |
|
|
17
18
|
|
|
18
19
|
Scenario: new(transaction_id: 123)
|
|
19
20
|
When I try to create an OpenFlow message with:
|
|
@@ -22,14 +23,14 @@ Feature: Pio::Echo::Request
|
|
|
22
23
|
"""
|
|
23
24
|
Then it should finish successfully
|
|
24
25
|
And the message have the following fields and values:
|
|
25
|
-
| field |
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
| user_data |
|
|
26
|
+
| field | value |
|
|
27
|
+
| ofp_version | 1 |
|
|
28
|
+
| message_type | 2 |
|
|
29
|
+
| message_length | 8 |
|
|
30
|
+
| transaction_id | 123 |
|
|
31
|
+
| xid | 123 |
|
|
32
|
+
| body | |
|
|
33
|
+
| user_data | |
|
|
33
34
|
|
|
34
35
|
Scenario: new(xid: 123)
|
|
35
36
|
When I try to create an OpenFlow message with:
|
|
@@ -38,28 +39,30 @@ Feature: Pio::Echo::Request
|
|
|
38
39
|
"""
|
|
39
40
|
Then it should finish successfully
|
|
40
41
|
And the message have the following fields and values:
|
|
41
|
-
| field |
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
| user_data |
|
|
42
|
+
| field | value |
|
|
43
|
+
| ofp_version | 1 |
|
|
44
|
+
| message_type | 2 |
|
|
45
|
+
| message_length | 8 |
|
|
46
|
+
| transaction_id | 123 |
|
|
47
|
+
| xid | 123 |
|
|
48
|
+
| body | |
|
|
49
|
+
| user_data | |
|
|
49
50
|
|
|
50
|
-
Scenario: new(
|
|
51
|
+
Scenario: new(body: 'echo request body')
|
|
51
52
|
When I try to create an OpenFlow message with:
|
|
52
53
|
"""
|
|
53
|
-
Pio::Echo::Request.new(
|
|
54
|
+
Pio::Echo::Request.new(body: 'echo request body')
|
|
54
55
|
"""
|
|
55
|
-
Then it should
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
Then it should finish successfully
|
|
57
|
+
And the message have the following fields and values:
|
|
58
|
+
| field | value |
|
|
59
|
+
| ofp_version | 1 |
|
|
60
|
+
| message_type | 2 |
|
|
61
|
+
| message_length | 25 |
|
|
62
|
+
| transaction_id | 0 |
|
|
63
|
+
| xid | 0 |
|
|
64
|
+
| body | echo request body |
|
|
65
|
+
| user_data | echo request body |
|
|
63
66
|
|
|
64
67
|
Scenario: new(user_data: 'echo request body')
|
|
65
68
|
When I try to create an OpenFlow message with:
|
|
@@ -68,28 +71,28 @@ Feature: Pio::Echo::Request
|
|
|
68
71
|
"""
|
|
69
72
|
Then it should finish successfully
|
|
70
73
|
And the message have the following fields and values:
|
|
71
|
-
| field |
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| user_data |
|
|
74
|
+
| field | value |
|
|
75
|
+
| ofp_version | 1 |
|
|
76
|
+
| message_type | 2 |
|
|
77
|
+
| message_length | 25 |
|
|
78
|
+
| transaction_id | 0 |
|
|
79
|
+
| xid | 0 |
|
|
80
|
+
| body | echo request body |
|
|
81
|
+
| user_data | echo request body |
|
|
79
82
|
|
|
80
83
|
Scenario: read (no message body)
|
|
81
84
|
When I try to parse a file named "open_flow10/echo_request.raw" with "Pio::Echo::Request" class
|
|
82
85
|
Then it should finish successfully
|
|
83
86
|
And the message have the following fields and values:
|
|
84
|
-
| field |
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
| user_data |
|
|
87
|
+
| field | value |
|
|
88
|
+
| ofp_version | 1 |
|
|
89
|
+
| message_type | 2 |
|
|
90
|
+
| message_length | 8 |
|
|
91
|
+
| transaction_id | 0 |
|
|
92
|
+
| xid | 0 |
|
|
93
|
+
| body | |
|
|
94
|
+
| user_data | |
|
|
92
95
|
|
|
93
96
|
Scenario: parse error
|
|
94
97
|
When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Echo::Request" class
|
|
95
|
-
Then it should fail with "Pio::ParseError", "Invalid Echo Request message."
|
|
98
|
+
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Echo Request message."
|