pio 0.24.1 → 0.24.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 +5 -0
- data/features/open_flow_read.feature +13 -42
- data/features/step_definitions/open_flow_steps.rb +10 -0
- data/lib/pio/open_flow.rb +3 -1
- data/lib/pio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d25e470a4443ef4ba0a44d6221ecf050a07c0dd7
|
4
|
+
data.tar.gz: 0517d69386f0c41461972a38595568c47008bff8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc580a7a68608c3785887da4412f35a38d526eb7cd9f256bb31511884f22e05a876165f679a8d7f2bf184e07c97dcad8c550564d8964b38c7a35cdf644a5260e
|
7
|
+
data.tar.gz: 82804fa39e8f8ce0934475c6cca8ea1bd93b9543548e2296e2b841cb9c8dfcd98eb941f3c5cb858a8f7863415efe3c03410571ff952d17e67e9c4faeedf00b32
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
## develop (unreleased)
|
4
4
|
|
5
5
|
|
6
|
+
## 0.24.2 (8/4/2015)
|
7
|
+
### Bugs fixed
|
8
|
+
* [#209](https://github.com/trema/pio/issues/209): `Pio::OpenFlow.read` cannot parse Barrier messages.
|
9
|
+
|
10
|
+
|
6
11
|
## 0.24.1 (8/4/2015)
|
7
12
|
### Bugs fixed
|
8
13
|
* [#208](https://github.com/trema/pio/issues/208): `Pio::FlowMod.new` doesn't allow `:idle_timeout` and `:hard_timeout` options.
|
@@ -1,43 +1,14 @@
|
|
1
1
|
Feature: Pio::OpenFlow.read
|
2
|
-
Scenario:
|
3
|
-
Given I switch the Pio::OpenFlow version to "OpenFlow10"
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
Given I switch the Pio::OpenFlow version to "OpenFlow10"
|
16
|
-
When I try to parse a file named "open_flow10/echo_reply.raw" with "OpenFlow" class
|
17
|
-
Then it should finish successfully
|
18
|
-
And the message should be a "Pio::OpenFlow10::Echo::Reply"
|
19
|
-
|
20
|
-
Scenario: Features::Request
|
21
|
-
Given I switch the Pio::OpenFlow version to "OpenFlow10"
|
22
|
-
When I try to parse a file named "open_flow10/features_request.raw" with "OpenFlow" class
|
23
|
-
Then it should finish successfully
|
24
|
-
And the message should be a "Pio::OpenFlow10::Features::Request"
|
25
|
-
|
26
|
-
Scenario: Features::Reply
|
27
|
-
Given I switch the Pio::OpenFlow version to "OpenFlow10"
|
28
|
-
When I try to parse a file named "open_flow10/features_reply.raw" with "OpenFlow" class
|
29
|
-
Then it should finish successfully
|
30
|
-
And the message should be a "Pio::OpenFlow10::Features::Reply"
|
31
|
-
|
32
|
-
Scenario: PacketIn
|
33
|
-
Given I switch the Pio::OpenFlow version to "OpenFlow10"
|
34
|
-
When I try to parse a file named "open_flow10/packet_in.raw" with "OpenFlow" class
|
35
|
-
Then it should finish successfully
|
36
|
-
And the message should be a "Pio::OpenFlow10::PacketIn"
|
37
|
-
|
38
|
-
Scenario: PortStatus
|
39
|
-
Given I switch the Pio::OpenFlow version to "OpenFlow10"
|
40
|
-
When I try to parse a file named "open_flow10/port_status.raw" with "OpenFlow" class
|
41
|
-
Then it should finish successfully
|
42
|
-
And the message should be a "Pio::OpenFlow10::PortStatus"
|
43
|
-
|
2
|
+
Scenario: OpenFlow10
|
3
|
+
Given I switch the Pio::OpenFlow version to "OpenFlow10"
|
4
|
+
Then the following each raw file should be parsed into its corresponding object using OpenFlow.read
|
5
|
+
| raw file | result object |
|
6
|
+
| open_flow10/hello.raw | Pio::OpenFlow10::Hello |
|
7
|
+
| open_flow10/echo_request.raw | Pio::OpenFlow10::Echo::Request |
|
8
|
+
| open_flow10/echo_reply.raw | Pio::OpenFlow10::Echo::Reply |
|
9
|
+
| open_flow10/features_request.raw | Pio::OpenFlow10::Features::Request |
|
10
|
+
| open_flow10/features_reply.raw | Pio::OpenFlow10::Features::Reply |
|
11
|
+
| open_flow10/packet_in.raw | Pio::OpenFlow10::PacketIn |
|
12
|
+
| open_flow10/port_status.raw | Pio::OpenFlow10::PortStatus |
|
13
|
+
| open_flow10/barrier_request.raw | Pio::OpenFlow10::Barrier::Request |
|
14
|
+
| open_flow10/barrier_reply.raw | Pio::OpenFlow10::Barrier::Reply |
|
@@ -29,3 +29,13 @@ end
|
|
29
29
|
When(/^I try to create an OpenFlow instruction with:$/) do |ruby_code|
|
30
30
|
step 'I try to create a packet with:', ruby_code
|
31
31
|
end
|
32
|
+
|
33
|
+
# rubocop:disable LineLength
|
34
|
+
Then(/^the following each raw file should be parsed into its corresponding object using OpenFlow\.read$/) do |table|
|
35
|
+
table.hashes.each do |each|
|
36
|
+
step %(I try to parse a file named "#{each['raw file']}" with "OpenFlow" class)
|
37
|
+
step 'it should finish successfully'
|
38
|
+
step %(the message should be a "#{each['result object']}")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
# rubocop:enable LineLength
|
data/lib/pio/open_flow.rb
CHANGED
@@ -33,7 +33,9 @@ module Pio
|
|
33
33
|
5 => Pio::Features::Request,
|
34
34
|
6 => Pio::Features::Reply,
|
35
35
|
10 => Pio::PacketIn,
|
36
|
-
12 => Pio::PortStatus
|
36
|
+
12 => Pio::PortStatus,
|
37
|
+
18 => Pio::Barrier::Request,
|
38
|
+
19 => Pio::Barrier::Reply
|
37
39
|
}
|
38
40
|
header = OpenFlowHeaderParser.read(binary)
|
39
41
|
parser.fetch(header.message_type).read(binary)
|
data/lib/pio/version.rb
CHANGED