pio 0.27.2 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Rakefile +1 -1
- data/bin/{code_metrics → terminal-notifier} +2 -2
- data/features/dhcp.feature +12 -12
- data/features/icmp.feature +12 -12
- data/features/open_flow10/aggregate_stats_request.feature +10 -10
- data/features/open_flow10/enqueue.feature +7 -7
- data/features/open_flow10/exact_match.feature +15 -15
- data/features/open_flow10/features_reply.feature +40 -40
- data/features/open_flow10/flow_mod.feature +49 -49
- data/features/open_flow10/flow_removed.feature +34 -0
- data/features/open_flow10/flow_stats_reply.feature +14 -14
- data/features/open_flow10/flow_stats_request.feature +15 -15
- data/features/open_flow10/nicira_resubmit.feature +30 -0
- data/features/open_flow10/nicira_resubmit_table.feature +32 -0
- data/features/open_flow10/port_stats_request.feature +48 -0
- data/features/open_flow10/port_stats_request.raw +0 -0
- data/features/open_flow10/queue_stats_request.feature +51 -0
- data/features/open_flow10/queue_stats_request.raw +0 -0
- data/features/open_flow10/send_out_port.feature +40 -40
- data/features/open_flow10/set_destination_mac_address.feature +16 -0
- data/features/open_flow10/set_ip_destination_address.feature +6 -6
- data/features/open_flow10/set_source_ip_address.feature +16 -0
- data/features/open_flow10/set_source_mac_address.feature +16 -0
- data/features/open_flow10/{set_ip_tos.feature → set_tos.feature} +3 -3
- data/features/open_flow10/set_transport_destination_port.feature +6 -6
- data/features/open_flow10/set_transport_source_port.feature +6 -6
- data/features/open_flow10/set_vlan_priority.feature +3 -3
- data/features/open_flow10/set_vlan_vid.feature +6 -6
- data/features/open_flow10/strip_vlan_header.feature +5 -5
- data/features/open_flow10/table_stats_request.feature +31 -0
- data/features/open_flow13/match.feature +33 -33
- data/features/open_flow13/send_out_port.feature +45 -45
- data/features/udp.feature +2 -2
- data/lib/pio/arp/format.rb +5 -5
- data/lib/pio/dhcp/boot_reply_options.rb +6 -6
- data/lib/pio/dhcp/boot_request_options.rb +2 -2
- data/lib/pio/dhcp/common_options.rb +5 -5
- data/lib/pio/dhcp/message.rb +2 -2
- data/lib/pio/icmp/options.rb +2 -2
- data/lib/pio/icmp/reply.rb +6 -6
- data/lib/pio/icmp/request.rb +6 -6
- data/lib/pio/ipv4_header.rb +11 -11
- data/lib/pio/open_flow.rb +5 -2
- data/lib/pio/open_flow/action.rb +41 -0
- data/lib/pio/open_flow/nicira_action.rb +17 -0
- data/lib/pio/open_flow10.rb +12 -1
- data/lib/pio/open_flow10/actions.rb +17 -15
- data/lib/pio/open_flow10/enqueue.rb +27 -46
- data/lib/pio/open_flow10/features/reply.rb +5 -5
- data/lib/pio/open_flow10/flow_removed.rb +40 -0
- data/lib/pio/open_flow10/match.rb +33 -33
- data/lib/pio/open_flow10/nicira_resubmit.rb +20 -0
- data/lib/pio/open_flow10/nicira_resubmit_table.rb +17 -0
- data/lib/pio/open_flow10/port_stats/request.rb +25 -0
- data/lib/pio/open_flow10/queue_stats/request.rb +22 -0
- data/lib/pio/open_flow10/send_out_port.rb +6 -27
- data/lib/pio/open_flow10/set_destination_ip_address.rb +16 -0
- data/lib/pio/open_flow10/set_destination_mac_address.rb +18 -0
- data/lib/pio/open_flow10/set_source_ip_address.rb +16 -0
- data/lib/pio/open_flow10/set_source_mac_address.rb +18 -0
- data/lib/pio/open_flow10/set_tos.rb +24 -0
- data/lib/pio/open_flow10/set_transport_port.rb +32 -48
- data/lib/pio/open_flow10/set_vlan_priority.rb +16 -11
- data/lib/pio/open_flow10/set_vlan_vid.rb +16 -11
- data/lib/pio/open_flow10/stats_request.rb +5 -1
- data/lib/pio/open_flow10/strip_vlan_header.rb +8 -25
- data/lib/pio/open_flow10/table_stats/request.rb +19 -0
- data/lib/pio/open_flow13/actions.rb +1 -1
- data/lib/pio/open_flow13/match.rb +19 -19
- data/lib/pio/open_flow13/send_out_port.rb +9 -28
- data/lib/pio/udp_header.rb +4 -4
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +3 -2
- data/spec/pio/dhcp/ack_spec.rb +8 -8
- data/spec/pio/dhcp/offer_spec.rb +8 -8
- data/spec/pio/dhcp_spec.rb +16 -16
- data/spec/pio/icmp/reply_spec.rb +4 -4
- data/spec/pio/icmp/request_spec.rb +6 -6
- data/spec/pio/icmp_spec.rb +4 -4
- data/spec/pio/open_flow10/enqueue_spec.rb +13 -11
- data/spec/pio/open_flow10/flow_mod_spec.rb +20 -20
- data/spec/pio/open_flow10/flow_stats_request_spec.rb +4 -4
- data/spec/pio/open_flow10/match_spec.rb +59 -59
- data/spec/pio/open_flow10/packet_out_spec.rb +31 -29
- data/spec/pio/open_flow10/set_destination_ip_address_spec.rb +27 -0
- data/spec/pio/open_flow10/set_destination_mac_address_spec.rb +28 -0
- data/spec/pio/open_flow10/set_source_ip_address_spec.rb +27 -0
- data/spec/pio/open_flow10/set_source_mac_address_spec.rb +28 -0
- data/spec/pio/open_flow10/set_tos_spec.rb +30 -0
- data/spec/pio/open_flow10/set_transport_destination_port_spec.rb +4 -4
- data/spec/pio/open_flow10/set_transport_source_port_spec.rb +4 -4
- 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 +5 -5
- data/spec/pio/open_flow10/wildcards_spec.rb +18 -18
- data/spec/pio/open_flow13/match_spec.rb +20 -20
- metadata +73 -37
- data/bin/code_metrics-profile +0 -16
- data/features/open_flow10/set_ether_destination_address.feature +0 -16
- data/features/open_flow10/set_ether_source_address.feature +0 -16
- data/features/open_flow10/set_ip_source_address.feature +0 -16
- data/lib/pio/open_flow10/set_ether_address.rb +0 -53
- data/lib/pio/open_flow10/set_ip_address.rb +0 -49
- data/lib/pio/open_flow10/set_ip_tos.rb +0 -42
- data/lib/pio/open_flow10/set_vlan.rb +0 -37
- data/spec/pio/open_flow10/set_ether_destination_address_spec.rb +0 -28
- data/spec/pio/open_flow10/set_ether_source_address_spec.rb +0 -28
- data/spec/pio/open_flow10/set_ip_destination_address_spec.rb +0 -27
- data/spec/pio/open_flow10/set_ip_source_address_spec.rb +0 -25
- data/spec/pio/open_flow10/set_ip_tos_spec.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60e79f351fee115f951c0959d67808d09f50aabd
|
4
|
+
data.tar.gz: 4ce3f74667ac4b8c89f96e9ca6de53b4e6ba6bad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2096ae71388686504dc50bdcea0a49679f641d174161e48068b64714473fdf6a57932d8fed835d7cdd7f3bf4e86c12e0e27acd1324d1315a0f912ed37807f8d2
|
7
|
+
data.tar.gz: 424e8a76bbba2c3ce01aea01b17c3c36f7e42cd93db506eeda8fa800bbaa9446c0f91cf755e9d1438b4f4ad992b034c18bcfc6cae6ab6bbd6785707e5382daaf
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,23 @@
|
|
3
3
|
## develop (unreleased)
|
4
4
|
|
5
5
|
|
6
|
+
## 0.28.0 (11/5/2015)
|
7
|
+
### New features
|
8
|
+
* [#267](https://github.com/trema/pio/pull/267): Add Queue Stats Request message generator.
|
9
|
+
* [#266](https://github.com/trema/pio/pull/266): Add Port Stats Request message generator.
|
10
|
+
* [#252](https://github.com/trema/pio/pull/252): Add NiciraResubmit and NiciraResubmitTable actions.
|
11
|
+
* [#251](https://github.com/trema/pio/pull/251): Add Table Stats Request message generator.
|
12
|
+
* [#250](https://github.com/trema/pio/pull/250): Add Flow Removed message parser.
|
13
|
+
|
14
|
+
### Changes
|
15
|
+
* [#272](https://github.com/trema/pio/pull/272): Rename `Match` option: `:ip_source_address` -> `:source_ip_address` and `:ip_destination_address` -> `:destination_ip_address`.
|
16
|
+
* [#271](https://github.com/trema/pio/pull/271): Rename `Match` option: `:ether_destination_address` -> `:destination_mac_address`.
|
17
|
+
* [#270](https://github.com/trema/pio/pull/270): Rename `Match` option: `:ether_source_address` -> `:source_mac_address`.
|
18
|
+
* [#269](https://github.com/trema/pio/pull/269): Rename `SetIpSourceAddress` -> `SetSourceIpAddress` and `SetIpDestinationAddress` -> `SetDestinationIpAddress`.
|
19
|
+
* [#268](https://github.com/trema/pio/pull/268): Rename `SetEtherSourceAddress` -> `SetSourceMacAddress` and `SetEtherDestinationAddress` -> `SetDestinationMacAddress`.
|
20
|
+
* [#265](https://github.com/trema/pio/pull/265): Rename `SetIpTos` -> `SetTos`.
|
21
|
+
|
22
|
+
|
6
23
|
## 0.27.2 (10/25/2015)
|
7
24
|
### New features
|
8
25
|
* [#244](https://github.com/trema/pio/pull/244): Support ARP in `ExactMatch.new`.
|
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 'terminal-notifier' 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('terminal-notifier', 'terminal-notifier')
|
data/features/dhcp.feature
CHANGED
@@ -5,8 +5,8 @@ Feature: Pio::Dhcp
|
|
5
5
|
Pio::Dhcp::Ack.new(
|
6
6
|
source_mac: 'aa:bb:cc:dd:ee:ff',
|
7
7
|
destination_mac: '11:22:33:44:55:66',
|
8
|
-
|
9
|
-
|
8
|
+
source_ip_address: '192.168.0.10',
|
9
|
+
destination_ip_address: '192.168.0.1',
|
10
10
|
transaction_id: 0xdeadbeef,
|
11
11
|
renewal_time_value: 0xdeadbeef,
|
12
12
|
rebinding_time_value: 0xdeadbeef,
|
@@ -31,8 +31,8 @@ Feature: Pio::Dhcp
|
|
31
31
|
| ip_ttl | 128 |
|
32
32
|
| ip_protocol | 17 |
|
33
33
|
| ip_header_checksum | 47177 |
|
34
|
-
|
|
35
|
-
|
|
34
|
+
| source_ip_address | 192.168.0.10 |
|
35
|
+
| destination_ip_address | 192.168.0.1 |
|
36
36
|
| udp_source_port | 67 |
|
37
37
|
| udp_destination_port | 68 |
|
38
38
|
| udp_length | 308 |
|
@@ -80,8 +80,8 @@ Feature: Pio::Dhcp
|
|
80
80
|
| ip_ttl | 128 |
|
81
81
|
| ip_protocol | 17 |
|
82
82
|
| ip_header_checksum | 14758 |
|
83
|
-
|
|
84
|
-
|
|
83
|
+
| source_ip_address | 0.0.0.0 |
|
84
|
+
| destination_ip_address | 255.255.255.255 |
|
85
85
|
| udp_source_port | 68 |
|
86
86
|
| udp_destination_port | 67 |
|
87
87
|
| udp_length | 308 |
|
@@ -128,8 +128,8 @@ Feature: Pio::Dhcp
|
|
128
128
|
| ip_ttl | 128 |
|
129
129
|
| ip_protocol | 17 |
|
130
130
|
| ip_header_checksum | 14758 |
|
131
|
-
|
|
132
|
-
|
|
131
|
+
| source_ip_address | 0.0.0.0 |
|
132
|
+
| destination_ip_address | 255.255.255.255 |
|
133
133
|
| udp_source_port | 68 |
|
134
134
|
| udp_destination_port | 67 |
|
135
135
|
| udp_length | 308 |
|
@@ -156,8 +156,8 @@ Feature: Pio::Dhcp
|
|
156
156
|
Pio::Dhcp::Offer.new(
|
157
157
|
source_mac: 'aa:bb:cc:dd:ee:ff',
|
158
158
|
destination_mac: '11:22:33:44:55:66',
|
159
|
-
|
160
|
-
|
159
|
+
source_ip_address: '192.168.0.10',
|
160
|
+
destination_ip_address: '192.168.0.1',
|
161
161
|
transaction_id: 0xdeadbeef,
|
162
162
|
renewal_time_value: 0xdeadbeef,
|
163
163
|
rebinding_time_value: 0xdeadbeef,
|
@@ -182,8 +182,8 @@ Feature: Pio::Dhcp
|
|
182
182
|
| ip_ttl | 128 |
|
183
183
|
| ip_protocol | 17 |
|
184
184
|
| ip_header_checksum | 47177 |
|
185
|
-
|
|
186
|
-
|
|
185
|
+
| source_ip_address | 192.168.0.10 |
|
186
|
+
| destination_ip_address | 192.168.0.1 |
|
187
187
|
| udp_source_port | 67 |
|
188
188
|
| udp_destination_port | 68 |
|
189
189
|
| udp_length | 308 |
|
data/features/icmp.feature
CHANGED
@@ -5,8 +5,8 @@ Feature: Pio::Icmp
|
|
5
5
|
Pio::Icmp::Request.new(
|
6
6
|
source_mac: '00:16:9d:1d:9c:c4',
|
7
7
|
destination_mac: '00:26:82:eb:ea:d1',
|
8
|
-
|
9
|
-
|
8
|
+
source_ip_address: '192.168.83.3',
|
9
|
+
destination_ip_address: '192.168.83.254'
|
10
10
|
)
|
11
11
|
"""
|
12
12
|
Then it should finish successfully
|
@@ -26,8 +26,8 @@ Feature: Pio::Icmp
|
|
26
26
|
| ip_ttl | 128 |
|
27
27
|
| ip_protocol | 1 |
|
28
28
|
| ip_header_checksum | 4729 |
|
29
|
-
|
|
30
|
-
|
|
29
|
+
| source_ip_address | 192.168.83.3 |
|
30
|
+
| destination_ip_address | 192.168.83.254 |
|
31
31
|
| ip_option | |
|
32
32
|
| icmp_type | 8 |
|
33
33
|
| icmp_code | 0 |
|
@@ -42,8 +42,8 @@ Feature: Pio::Icmp
|
|
42
42
|
Pio::Icmp::Reply.new(
|
43
43
|
source_mac: '00:26:82:eb:ea:d1',
|
44
44
|
destination_mac: '00:16:9d:1d:9c:c4',
|
45
|
-
|
46
|
-
|
45
|
+
source_ip_address: '192.168.83.254',
|
46
|
+
destination_ip_address: '192.168.83.3',
|
47
47
|
identifier: 256,
|
48
48
|
sequence_number: 0
|
49
49
|
)
|
@@ -65,8 +65,8 @@ Feature: Pio::Icmp
|
|
65
65
|
| ip_ttl | 128 |
|
66
66
|
| ip_protocol | 1 |
|
67
67
|
| ip_header_checksum | 4729 |
|
68
|
-
|
|
69
|
-
|
|
68
|
+
| source_ip_address | 192.168.83.254 |
|
69
|
+
| destination_ip_address | 192.168.83.3 |
|
70
70
|
| ip_option | |
|
71
71
|
| icmp_type | 0 |
|
72
72
|
| icmp_code | 0 |
|
@@ -94,8 +94,8 @@ Feature: Pio::Icmp
|
|
94
94
|
| ip_ttl | 128 |
|
95
95
|
| ip_protocol | 1 |
|
96
96
|
| ip_header_checksum | 10850 |
|
97
|
-
|
|
98
|
-
|
|
97
|
+
| source_ip_address | 192.168.0.114 |
|
98
|
+
| destination_ip_address | 192.168.0.1 |
|
99
99
|
| ip_option | |
|
100
100
|
| icmp_type | 8 |
|
101
101
|
| icmp_code | 0 |
|
@@ -119,8 +119,8 @@ Feature: Pio::Icmp
|
|
119
119
|
| ip_ttl | 127 |
|
120
120
|
| ip_protocol | 1 |
|
121
121
|
| ip_header_checksum | 23463 |
|
122
|
-
|
|
123
|
-
|
|
122
|
+
| source_ip_address | 192.168.0.1 |
|
123
|
+
| destination_ip_address | 192.168.0.114 |
|
124
124
|
| ip_option | |
|
125
125
|
| icmp_type | 0 |
|
126
126
|
| icmp_code | 0 |
|
@@ -16,13 +16,13 @@ Feature: Pio::AggregateStats::Request
|
|
16
16
|
| stats_type | :aggregate |
|
17
17
|
| match.in_port | 1 |
|
18
18
|
| match.wildcards.keys.size | 11 |
|
19
|
-
| match.wildcards.fetch(:
|
20
|
-
| match.wildcards.fetch(:
|
19
|
+
| match.wildcards.fetch(:destination_mac_address) | true |
|
20
|
+
| match.wildcards.fetch(:source_mac_address) | true |
|
21
21
|
| match.wildcards.fetch(:ether_type) | true |
|
22
|
-
| match.wildcards.fetch(:
|
22
|
+
| match.wildcards.fetch(:destination_ip_address_all) | true |
|
23
23
|
| match.wildcards.fetch(:ip_protocol) | true |
|
24
|
-
| match.wildcards.fetch(:
|
25
|
-
| match.wildcards.fetch(:
|
24
|
+
| match.wildcards.fetch(:source_ip_address_all) | true |
|
25
|
+
| match.wildcards.fetch(:tos) | true |
|
26
26
|
| match.wildcards.fetch(:transport_destination_port) | true |
|
27
27
|
| match.wildcards.fetch(:transport_source_port) | true |
|
28
28
|
| match.wildcards.fetch(:vlan_priority) | true |
|
@@ -43,14 +43,14 @@ Feature: Pio::AggregateStats::Request
|
|
43
43
|
| xid | 14 |
|
44
44
|
| stats_type | :aggregate |
|
45
45
|
| match.wildcards.keys.size | 12 |
|
46
|
-
| match.wildcards.fetch(:
|
47
|
-
| match.wildcards.fetch(:
|
46
|
+
| match.wildcards.fetch(:destination_mac_address) | true |
|
47
|
+
| match.wildcards.fetch(:source_mac_address) | true |
|
48
48
|
| match.wildcards.fetch(:ether_type) | true |
|
49
49
|
| match.wildcards.fetch(:in_port) | true |
|
50
|
-
| match.wildcards.fetch(:
|
50
|
+
| match.wildcards.fetch(:destination_ip_address_all) | true |
|
51
51
|
| match.wildcards.fetch(:ip_protocol) | true |
|
52
|
-
| match.wildcards.fetch(:
|
53
|
-
| match.wildcards.fetch(:
|
52
|
+
| match.wildcards.fetch(:source_ip_address_all) | true |
|
53
|
+
| match.wildcards.fetch(:tos) | true |
|
54
54
|
| match.wildcards.fetch(:transport_destination_port) | true |
|
55
55
|
| match.wildcards.fetch(:transport_source_port) | true |
|
56
56
|
| match.wildcards.fetch(:vlan_priority) | true |
|
@@ -1,17 +1,17 @@
|
|
1
1
|
@open_flow10
|
2
|
-
Feature: Pio::Enqueue
|
2
|
+
Feature: Pio::OpenFlow10::Enqueue
|
3
3
|
|
4
4
|
Scenario: new(port: 1, queue_id: 2)
|
5
5
|
When I try to create an OpenFlow action with:
|
6
6
|
"""
|
7
|
-
Pio::Enqueue.new(port: 1, queue_id: 2)
|
7
|
+
Pio::OpenFlow10::Enqueue.new(port: 1, queue_id: 2)
|
8
8
|
"""
|
9
9
|
Then it should finish successfully
|
10
10
|
And the action has the following fields and values:
|
11
|
-
| field
|
12
|
-
| action_type
|
13
|
-
|
|
14
|
-
| port
|
15
|
-
| queue_id
|
11
|
+
| field | value |
|
12
|
+
| action_type | 11 |
|
13
|
+
| action_length | 16 |
|
14
|
+
| port | 1 |
|
15
|
+
| queue_id | 2 |
|
16
16
|
|
17
17
|
|
@@ -5,15 +5,15 @@ Feature: Pio::ExactMatch
|
|
5
5
|
| field | value |
|
6
6
|
| wildcards | {} |
|
7
7
|
| in_port | 1 |
|
8
|
-
|
|
9
|
-
|
|
8
|
+
| source_mac_address | ac:5d:10:31:37:79 |
|
9
|
+
| destination_mac_address | ff:ff:ff:ff:ff:ff |
|
10
10
|
| vlan_vid | 65535 |
|
11
11
|
| vlan_priority | 0 |
|
12
12
|
| ether_type | 2054 |
|
13
|
-
|
|
13
|
+
| tos | 0 |
|
14
14
|
| ip_protocol | 1 |
|
15
|
-
|
|
16
|
-
|
|
15
|
+
| source_ip_address | 192.168.2.254 |
|
16
|
+
| destination_ip_address | 192.168.2.5 |
|
17
17
|
| transport_source_port | 0 |
|
18
18
|
| transport_destination_port | 0 |
|
19
19
|
|
@@ -23,15 +23,15 @@ Feature: Pio::ExactMatch
|
|
23
23
|
| field | value |
|
24
24
|
| wildcards | {} |
|
25
25
|
| in_port | 1 |
|
26
|
-
|
|
27
|
-
|
|
26
|
+
| source_mac_address | 11:11:11:11:11:11 |
|
27
|
+
| destination_mac_address | 22:22:22:22:22:22 |
|
28
28
|
| vlan_vid | 65535 |
|
29
29
|
| vlan_priority | 0 |
|
30
30
|
| ether_type | 2054 |
|
31
|
-
|
|
31
|
+
| tos | 0 |
|
32
32
|
| ip_protocol | 2 |
|
33
|
-
|
|
34
|
-
|
|
33
|
+
| source_ip_address | 192.168.0.1 |
|
34
|
+
| destination_ip_address | 192.168.0.2 |
|
35
35
|
| transport_source_port | 0 |
|
36
36
|
| transport_destination_port | 0 |
|
37
37
|
|
@@ -41,14 +41,14 @@ Feature: Pio::ExactMatch
|
|
41
41
|
| field | value |
|
42
42
|
| wildcards | {} |
|
43
43
|
| in_port | 1 |
|
44
|
-
|
|
45
|
-
|
|
44
|
+
| source_mac_address | 00:00:00:00:00:01 |
|
45
|
+
| destination_mac_address | 80:00:00:00:00:01 |
|
46
46
|
| vlan_vid | 65535 |
|
47
47
|
| vlan_priority | 0 |
|
48
48
|
| ether_type | 2048 |
|
49
|
-
|
|
49
|
+
| tos | 0 |
|
50
50
|
| ip_protocol | 255 |
|
51
|
-
|
|
52
|
-
|
|
51
|
+
| source_ip_address | 192.168.0.40 |
|
52
|
+
| destination_ip_address | 192.168.1.40 |
|
53
53
|
| transport_source_port | 31256 |
|
54
54
|
| transport_destination_port | 22635 |
|
@@ -8,7 +8,7 @@ Feature: Pio::Features::Reply
|
|
8
8
|
n_buffers: 0x100,
|
9
9
|
n_tables: 0xfe,
|
10
10
|
capabilities: [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip],
|
11
|
-
actions: [:output, :
|
11
|
+
actions: [:output, :set_source_mac_address, :set_destination_mac_address],
|
12
12
|
ports: [{ port_no: 1,
|
13
13
|
hardware_address: '11:22:33:44:55:66',
|
14
14
|
name: 'port123',
|
@@ -30,7 +30,7 @@ Feature: Pio::Features::Reply
|
|
30
30
|
| n_buffers | 256 |
|
31
31
|
| n_tables | 254 |
|
32
32
|
| capabilities | [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip] |
|
33
|
-
| actions |
|
33
|
+
| actions | [:output, :set_source_mac_address, :set_destination_mac_address] |
|
34
34
|
| ports.length | 1 |
|
35
35
|
| ports[0].datapath_id | 291 |
|
36
36
|
| ports[0].port_no | 1 |
|
@@ -48,41 +48,41 @@ Feature: Pio::Features::Reply
|
|
48
48
|
When I try to parse a file named "open_flow10/features_reply.raw" with "Features::Reply" class
|
49
49
|
Then it should finish successfully
|
50
50
|
And the message has the following fields and values:
|
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, :
|
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
|
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_source_mac_address, :set_destination_mac_address, :set_source_ip_address, :set_destination_ip_address, :set_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 |
|
@@ -29,16 +29,16 @@ Feature: Pio::FlowMod
|
|
29
29
|
| match.wildcards.keys.size | 12 |
|
30
30
|
| match.wildcards.key?(:in_port) | true |
|
31
31
|
| match.wildcards.key?(:vlan_vid) | true |
|
32
|
-
| match.wildcards.key?(:
|
33
|
-
| match.wildcards.key?(:
|
32
|
+
| match.wildcards.key?(:source_mac_address) | true |
|
33
|
+
| match.wildcards.key?(:destination_mac_address) | true |
|
34
34
|
| match.wildcards.key?(:ether_type) | true |
|
35
35
|
| match.wildcards.key?(:ip_protocol) | true |
|
36
36
|
| match.wildcards.key?(:transport_source_port) | true |
|
37
37
|
| match.wildcards.key?(:transport_destination_port) | true |
|
38
|
-
| match.wildcards.key?(:
|
39
|
-
| match.wildcards.key?(:
|
38
|
+
| match.wildcards.key?(:source_ip_address_all) | true |
|
39
|
+
| match.wildcards.key?(:destination_ip_address_all) | true |
|
40
40
|
| match.wildcards.key?(:vlan_priority) | true |
|
41
|
-
| match.wildcards.key?(:
|
41
|
+
| match.wildcards.key?(:tos) | true |
|
42
42
|
| out_port | 0 |
|
43
43
|
| priority | 0 |
|
44
44
|
|
@@ -52,19 +52,19 @@ Feature: Pio::FlowMod
|
|
52
52
|
| message_length | 192 |
|
53
53
|
| transaction_id | 0 |
|
54
54
|
| xid | 0 |
|
55
|
-
| match.wildcards | {:
|
55
|
+
| match.wildcards | {:source_ip_address=>24, :destination_ip_address=>24} |
|
56
56
|
| match.in_port | 1 |
|
57
|
-
| match.
|
58
|
-
| match.
|
57
|
+
| match.source_mac_address | 00:00:00:00:00:0a |
|
58
|
+
| match.destination_mac_address | 00:00:00:00:00:14 |
|
59
59
|
| match.vlan_vid | 0 |
|
60
60
|
| match.vlan_priority | 0 |
|
61
61
|
| match.ether_type | 2048 |
|
62
|
-
| match.
|
62
|
+
| match.tos | 0 |
|
63
63
|
| match.ip_protocol | 1 |
|
64
|
-
| match.
|
65
|
-
| match.
|
66
|
-
| match.
|
67
|
-
| match.
|
64
|
+
| match.source_ip_address | 10.0.0.0 |
|
65
|
+
| match.source_ip_address.prefixlen | 8 |
|
66
|
+
| match.destination_ip_address | 20.0.0.0 |
|
67
|
+
| match.destination_ip_address.prefixlen | 8 |
|
68
68
|
| match.transport_source_port | 8 |
|
69
69
|
| match.transport_destination_port | 0 |
|
70
70
|
| cookie | 0 |
|
@@ -76,7 +76,7 @@ Feature: Pio::FlowMod
|
|
76
76
|
| out_port | 65535 |
|
77
77
|
| flags | [:send_flow_rem] |
|
78
78
|
| actions.length | 12 |
|
79
|
-
| actions.first.class |
|
79
|
+
| actions.first.class | Pio::OpenFlow10::SetVlanVid |
|
80
80
|
| actions.first.vlan_id | 10 |
|
81
81
|
|
82
82
|
Scenario: read (Flow Mod Modify)
|
@@ -89,19 +89,19 @@ Feature: Pio::FlowMod
|
|
89
89
|
| message_length | 192 |
|
90
90
|
| transaction_id | 0 |
|
91
91
|
| xid | 0 |
|
92
|
-
| match.wildcards | {:
|
92
|
+
| match.wildcards | {:source_ip_address=>24, :destination_ip_address=>24} |
|
93
93
|
| match.in_port | 1 |
|
94
|
-
| match.
|
95
|
-
| match.
|
94
|
+
| match.source_mac_address | 00:00:00:00:00:0a |
|
95
|
+
| match.destination_mac_address | 00:00:00:00:00:14 |
|
96
96
|
| match.vlan_vid | 0 |
|
97
97
|
| match.vlan_priority | 0 |
|
98
98
|
| match.ether_type | 2048 |
|
99
|
-
| match.
|
99
|
+
| match.tos | 0 |
|
100
100
|
| match.ip_protocol | 1 |
|
101
|
-
| match.
|
102
|
-
| match.
|
103
|
-
| match.
|
104
|
-
| match.
|
101
|
+
| match.source_ip_address | 10.0.0.0 |
|
102
|
+
| match.source_ip_address.prefixlen | 8 |
|
103
|
+
| match.destination_ip_address | 20.0.0.0 |
|
104
|
+
| match.destination_ip_address.prefixlen | 8 |
|
105
105
|
| match.transport_source_port | 8 |
|
106
106
|
| match.transport_destination_port | 0 |
|
107
107
|
| cookie | 0 |
|
@@ -113,7 +113,7 @@ Feature: Pio::FlowMod
|
|
113
113
|
| out_port | 65535 |
|
114
114
|
| flags | [:send_flow_rem] |
|
115
115
|
| actions.length | 12 |
|
116
|
-
| actions.first.class |
|
116
|
+
| actions.first.class | Pio::OpenFlow10::SetVlanVid |
|
117
117
|
| actions.first.vlan_id | 10 |
|
118
118
|
|
119
119
|
Scenario: read (Flow Mod Modify Strict)
|
@@ -126,19 +126,19 @@ Feature: Pio::FlowMod
|
|
126
126
|
| message_length | 192 |
|
127
127
|
| transaction_id | 0 |
|
128
128
|
| xid | 0 |
|
129
|
-
| match.wildcards | {:
|
129
|
+
| match.wildcards | {:source_ip_address=>24, :destination_ip_address=>24} |
|
130
130
|
| match.in_port | 1 |
|
131
|
-
| match.
|
132
|
-
| match.
|
131
|
+
| match.source_mac_address | 00:00:00:00:00:0a |
|
132
|
+
| match.destination_mac_address | 00:00:00:00:00:14 |
|
133
133
|
| match.vlan_vid | 0 |
|
134
134
|
| match.vlan_priority | 0 |
|
135
135
|
| match.ether_type | 2048 |
|
136
|
-
| match.
|
136
|
+
| match.tos | 0 |
|
137
137
|
| match.ip_protocol | 1 |
|
138
|
-
| match.
|
139
|
-
| match.
|
140
|
-
| match.
|
141
|
-
| match.
|
138
|
+
| match.source_ip_address | 10.0.0.0 |
|
139
|
+
| match.source_ip_address.prefixlen | 8 |
|
140
|
+
| match.destination_ip_address | 20.0.0.0 |
|
141
|
+
| match.destination_ip_address.prefixlen | 8 |
|
142
142
|
| match.transport_source_port | 8 |
|
143
143
|
| match.transport_destination_port | 0 |
|
144
144
|
| cookie | 0 |
|
@@ -150,7 +150,7 @@ Feature: Pio::FlowMod
|
|
150
150
|
| out_port | 65535 |
|
151
151
|
| flags | [:send_flow_rem] |
|
152
152
|
| actions.length | 12 |
|
153
|
-
| actions.first.class |
|
153
|
+
| actions.first.class | Pio::OpenFlow10::SetVlanVid |
|
154
154
|
| actions.first.vlan_id | 10 |
|
155
155
|
|
156
156
|
Scenario: read (Flow Mod Delete)
|
@@ -163,19 +163,19 @@ Feature: Pio::FlowMod
|
|
163
163
|
| message_length | 72 |
|
164
164
|
| transaction_id | 0 |
|
165
165
|
| xid | 0 |
|
166
|
-
| match.wildcards | {:
|
166
|
+
| match.wildcards | {:source_ip_address=>24, :destination_ip_address=>24} |
|
167
167
|
| match.in_port | 1 |
|
168
|
-
| match.
|
169
|
-
| match.
|
168
|
+
| match.source_mac_address | 00:00:00:00:00:0a |
|
169
|
+
| match.destination_mac_address | 00:00:00:00:00:00 |
|
170
170
|
| match.vlan_vid | 0 |
|
171
171
|
| match.vlan_priority | 0 |
|
172
172
|
| match.ether_type | 2048 |
|
173
|
-
| match.
|
173
|
+
| match.tos | 0 |
|
174
174
|
| match.ip_protocol | 1 |
|
175
|
-
| match.
|
176
|
-
| match.
|
177
|
-
| match.
|
178
|
-
| match.
|
175
|
+
| match.source_ip_address | 10.0.0.0 |
|
176
|
+
| match.source_ip_address.prefixlen | 8 |
|
177
|
+
| match.destination_ip_address | 20.0.0.0 |
|
178
|
+
| match.destination_ip_address.prefixlen | 8 |
|
179
179
|
| match.transport_source_port | 8 |
|
180
180
|
| match.transport_destination_port | 0 |
|
181
181
|
| cookie | 0 |
|
@@ -195,22 +195,22 @@ Feature: Pio::FlowMod
|
|
195
195
|
| field | value |
|
196
196
|
| ofp_version | 1 |
|
197
197
|
| message_type | 14 |
|
198
|
-
| message_length
|
198
|
+
| message_length | 72 |
|
199
199
|
| transaction_id | 0 |
|
200
200
|
| xid | 0 |
|
201
|
-
| match.wildcards | {:
|
201
|
+
| match.wildcards | {:source_ip_address=>24, :destination_ip_address=>24} |
|
202
202
|
| match.in_port | 1 |
|
203
|
-
| match.
|
204
|
-
| match.
|
203
|
+
| match.source_mac_address | 00:00:00:00:00:0a |
|
204
|
+
| match.destination_mac_address | 00:00:00:00:00:14 |
|
205
205
|
| match.vlan_vid | 0 |
|
206
206
|
| match.vlan_priority | 0 |
|
207
207
|
| match.ether_type | 2048 |
|
208
|
-
| match.
|
208
|
+
| match.tos | 0 |
|
209
209
|
| match.ip_protocol | 1 |
|
210
|
-
| match.
|
211
|
-
| match.
|
212
|
-
| match.
|
213
|
-
| match.
|
210
|
+
| match.source_ip_address | 10.0.0.0 |
|
211
|
+
| match.source_ip_address.prefixlen | 8 |
|
212
|
+
| match.destination_ip_address | 20.0.0.0 |
|
213
|
+
| match.destination_ip_address.prefixlen | 8 |
|
214
214
|
| match.transport_source_port | 8 |
|
215
215
|
| match.transport_destination_port | 0 |
|
216
216
|
| cookie | 1 |
|