pio 0.27.2 → 0.28.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 +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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@open_flow10
|
|
2
|
+
Feature: Pio::FlowRemoved
|
|
3
|
+
|
|
4
|
+
@open_flow10
|
|
5
|
+
Scenario: read
|
|
6
|
+
When I try to parse a file named "open_flow10/flow_removed.raw" with "FlowRemoved" class
|
|
7
|
+
Then it should finish successfully
|
|
8
|
+
And the message has the following fields and values:
|
|
9
|
+
| field | value |
|
|
10
|
+
| ofp_version | 1 |
|
|
11
|
+
| message_type | 11 |
|
|
12
|
+
| message_length | 88 |
|
|
13
|
+
| transaction_id | 0 |
|
|
14
|
+
| xid | 0 |
|
|
15
|
+
| match.wildcards.keys.size | 11 |
|
|
16
|
+
| match.wildcards.fetch(:destination_mac_address) | true |
|
|
17
|
+
| match.wildcards.fetch(:source_mac_address) | true |
|
|
18
|
+
| match.wildcards.fetch(:ether_type) | true |
|
|
19
|
+
| match.wildcards.fetch(:destination_ip_address_all) | true |
|
|
20
|
+
| match.wildcards.fetch(:ip_protocol) | true |
|
|
21
|
+
| match.wildcards.fetch(:source_ip_address_all) | true |
|
|
22
|
+
| match.wildcards.fetch(:tos) | true |
|
|
23
|
+
| match.wildcards.fetch(:transport_destination_port) | true |
|
|
24
|
+
| match.wildcards.fetch(:transport_source_port) | true |
|
|
25
|
+
| match.wildcards.fetch(:vlan_priority) | true |
|
|
26
|
+
| match.wildcards.fetch(:vlan_vid) | true |
|
|
27
|
+
| cookie | 1 |
|
|
28
|
+
| priority | 65535 |
|
|
29
|
+
| reason | :delete |
|
|
30
|
+
| duration_sec | 0 |
|
|
31
|
+
| duration_nsec | 0 |
|
|
32
|
+
| idle_timeout | 0 |
|
|
33
|
+
| packet_count | 0 |
|
|
34
|
+
| byte_count | 0 |
|
|
@@ -39,16 +39,16 @@ Feature: Pio::FlowStats::Reply
|
|
|
39
39
|
| stats[0].entry_length | 104 |
|
|
40
40
|
| stats[0].table_id | 3 |
|
|
41
41
|
| stats[0].match.wildcards.keys.size | 14 |
|
|
42
|
-
| stats[0].match.wildcards.fetch(:
|
|
43
|
-
| stats[0].match.wildcards.fetch(:
|
|
42
|
+
| stats[0].match.wildcards.fetch(:destination_mac_address) | true |
|
|
43
|
+
| stats[0].match.wildcards.fetch(:source_mac_address) | true |
|
|
44
44
|
| stats[0].match.wildcards.fetch(:ether_type) | true |
|
|
45
45
|
| stats[0].match.wildcards.fetch(:in_port) | true |
|
|
46
|
-
| stats[0].match.wildcards.fetch(:
|
|
47
|
-
| stats[0].match.wildcards.fetch(:
|
|
46
|
+
| stats[0].match.wildcards.fetch(:destination_ip_address) | 31 |
|
|
47
|
+
| stats[0].match.wildcards.fetch(:destination_ip_address_all) | true |
|
|
48
48
|
| stats[0].match.wildcards.fetch(:ip_protocol) | true |
|
|
49
|
-
| stats[0].match.wildcards.fetch(:
|
|
50
|
-
| stats[0].match.wildcards.fetch(:
|
|
51
|
-
| stats[0].match.wildcards.fetch(:
|
|
49
|
+
| stats[0].match.wildcards.fetch(:source_ip_address) | 31 |
|
|
50
|
+
| stats[0].match.wildcards.fetch(:source_ip_address_all) | true |
|
|
51
|
+
| stats[0].match.wildcards.fetch(:tos) | true |
|
|
52
52
|
| stats[0].match.wildcards.fetch(:transport_destination_port) | true |
|
|
53
53
|
| stats[0].match.wildcards.fetch(:transport_source_port) | true |
|
|
54
54
|
| stats[0].match.wildcards.fetch(:vlan_priority) | true |
|
|
@@ -71,16 +71,16 @@ Feature: Pio::FlowStats::Reply
|
|
|
71
71
|
| stats[1].entry_length | 112 |
|
|
72
72
|
| stats[1].table_id | 4 |
|
|
73
73
|
| stats[1].match.wildcards.keys.size | 14 |
|
|
74
|
-
| stats[1].match.wildcards.fetch(:
|
|
75
|
-
| stats[1].match.wildcards.fetch(:
|
|
74
|
+
| stats[1].match.wildcards.fetch(:destination_mac_address) | true |
|
|
75
|
+
| stats[1].match.wildcards.fetch(:source_mac_address) | true |
|
|
76
76
|
| stats[1].match.wildcards.fetch(:ether_type) | true |
|
|
77
77
|
| stats[1].match.wildcards.fetch(:in_port) | true |
|
|
78
|
-
| stats[1].match.wildcards.fetch(:
|
|
79
|
-
| stats[1].match.wildcards.fetch(:
|
|
78
|
+
| stats[1].match.wildcards.fetch(:destination_ip_address) | 31 |
|
|
79
|
+
| stats[1].match.wildcards.fetch(:destination_ip_address_all) | true |
|
|
80
80
|
| stats[1].match.wildcards.fetch(:ip_protocol) | true |
|
|
81
|
-
| stats[1].match.wildcards.fetch(:
|
|
82
|
-
| stats[1].match.wildcards.fetch(:
|
|
83
|
-
| stats[1].match.wildcards.fetch(:
|
|
81
|
+
| stats[1].match.wildcards.fetch(:source_ip_address) | 31 |
|
|
82
|
+
| stats[1].match.wildcards.fetch(:source_ip_address_all) | true |
|
|
83
|
+
| stats[1].match.wildcards.fetch(:tos) | true |
|
|
84
84
|
| stats[1].match.wildcards.fetch(:transport_destination_port) | true |
|
|
85
85
|
| stats[1].match.wildcards.fetch(:transport_source_port) | true |
|
|
86
86
|
| stats[1].match.wildcards.fetch(:vlan_priority) | true |
|
|
@@ -15,14 +15,14 @@ Feature: Pio::FlowStats::Request
|
|
|
15
15
|
| xid | 0 |
|
|
16
16
|
| stats_type | :flow |
|
|
17
17
|
| match.wildcards.keys.size | 12 |
|
|
18
|
-
| match.wildcards.fetch(:
|
|
19
|
-
| match.wildcards.fetch(:
|
|
18
|
+
| match.wildcards.fetch(:destination_mac_address) | true |
|
|
19
|
+
| match.wildcards.fetch(:source_mac_address) | true |
|
|
20
20
|
| match.wildcards.fetch(:ether_type) | true |
|
|
21
21
|
| match.wildcards.fetch(:in_port) | 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 |
|
|
@@ -46,13 +46,13 @@ Feature: Pio::FlowStats::Request
|
|
|
46
46
|
| stats_type | :flow |
|
|
47
47
|
| match.in_port | 1 |
|
|
48
48
|
| match.wildcards.keys.size | 11 |
|
|
49
|
-
| match.wildcards.fetch(:
|
|
50
|
-
| match.wildcards.fetch(:
|
|
49
|
+
| match.wildcards.fetch(:destination_mac_address) | true |
|
|
50
|
+
| match.wildcards.fetch(:source_mac_address) | true |
|
|
51
51
|
| match.wildcards.fetch(:ether_type) | true |
|
|
52
|
-
| match.wildcards.fetch(:
|
|
52
|
+
| match.wildcards.fetch(:destination_ip_address_all) | true |
|
|
53
53
|
| match.wildcards.fetch(:ip_protocol) | true |
|
|
54
|
-
| match.wildcards.fetch(:
|
|
55
|
-
| match.wildcards.fetch(:
|
|
54
|
+
| match.wildcards.fetch(:source_ip_address_all) | true |
|
|
55
|
+
| match.wildcards.fetch(:tos) | true |
|
|
56
56
|
| match.wildcards.fetch(:transport_destination_port) | true |
|
|
57
57
|
| match.wildcards.fetch(:transport_source_port) | true |
|
|
58
58
|
| match.wildcards.fetch(:vlan_priority) | true |
|
|
@@ -73,14 +73,14 @@ Feature: Pio::FlowStats::Request
|
|
|
73
73
|
| xid | 13 |
|
|
74
74
|
| stats_type | :flow |
|
|
75
75
|
| match.wildcards.keys.size | 12 |
|
|
76
|
-
| match.wildcards.fetch(:
|
|
77
|
-
| match.wildcards.fetch(:
|
|
76
|
+
| match.wildcards.fetch(:destination_mac_address) | true |
|
|
77
|
+
| match.wildcards.fetch(:source_mac_address) | true |
|
|
78
78
|
| match.wildcards.fetch(:ether_type) | true |
|
|
79
79
|
| match.wildcards.fetch(:in_port) | true |
|
|
80
|
-
| match.wildcards.fetch(:
|
|
80
|
+
| match.wildcards.fetch(:destination_ip_address_all) | true |
|
|
81
81
|
| match.wildcards.fetch(:ip_protocol) | true |
|
|
82
|
-
| match.wildcards.fetch(:
|
|
83
|
-
| match.wildcards.fetch(:
|
|
82
|
+
| match.wildcards.fetch(:source_ip_address_all) | true |
|
|
83
|
+
| match.wildcards.fetch(:tos) | true |
|
|
84
84
|
| match.wildcards.fetch(:transport_destination_port) | true |
|
|
85
85
|
| match.wildcards.fetch(:transport_source_port) | true |
|
|
86
86
|
| match.wildcards.fetch(:vlan_priority) | true |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@open_flow10
|
|
2
|
+
Feature: Pio::NiciraResubmit
|
|
3
|
+
|
|
4
|
+
Scenario: new(1)
|
|
5
|
+
When I try to create an OpenFlow action with:
|
|
6
|
+
"""
|
|
7
|
+
Pio::NiciraResubmit.new(1)
|
|
8
|
+
"""
|
|
9
|
+
Then it should finish successfully
|
|
10
|
+
And the action has the following fields and values:
|
|
11
|
+
| field | value |
|
|
12
|
+
| action_type.to_hex | 0xffff |
|
|
13
|
+
| action_length | 16 |
|
|
14
|
+
| vendor.to_hex | 0x2320 |
|
|
15
|
+
| subtype | 1 |
|
|
16
|
+
| in_port | 1 |
|
|
17
|
+
|
|
18
|
+
Scenario: new(:in_port)
|
|
19
|
+
When I try to create an OpenFlow action with:
|
|
20
|
+
"""
|
|
21
|
+
Pio::NiciraResubmit.new(:in_port)
|
|
22
|
+
"""
|
|
23
|
+
Then it should finish successfully
|
|
24
|
+
And the action has the following fields and values:
|
|
25
|
+
| field | value |
|
|
26
|
+
| action_type.to_hex | 0xffff |
|
|
27
|
+
| action_length | 16 |
|
|
28
|
+
| vendor.to_hex | 0x2320 |
|
|
29
|
+
| subtype | 1 |
|
|
30
|
+
| in_port | :in_port |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@open_flow10
|
|
2
|
+
Feature: Pio::NiciraResubmitTable
|
|
3
|
+
|
|
4
|
+
Scenario: new(in_port: 1, table: 1)
|
|
5
|
+
When I try to create an OpenFlow action with:
|
|
6
|
+
"""
|
|
7
|
+
Pio::NiciraResubmitTable.new(in_port: 1, table: 1)
|
|
8
|
+
"""
|
|
9
|
+
Then it should finish successfully
|
|
10
|
+
And the action has the following fields and values:
|
|
11
|
+
| field | value |
|
|
12
|
+
| action_type.to_hex | 0xffff |
|
|
13
|
+
| action_length | 16 |
|
|
14
|
+
| vendor.to_hex | 0x2320 |
|
|
15
|
+
| subtype | 14 |
|
|
16
|
+
| in_port | 1 |
|
|
17
|
+
| table | 1 |
|
|
18
|
+
|
|
19
|
+
Scenario: new(:in_port)
|
|
20
|
+
When I try to create an OpenFlow action with:
|
|
21
|
+
"""
|
|
22
|
+
Pio::NiciraResubmitTable.new(in_port: 1)
|
|
23
|
+
"""
|
|
24
|
+
Then it should finish successfully
|
|
25
|
+
And the action has the following fields and values:
|
|
26
|
+
| field | value |
|
|
27
|
+
| action_type.to_hex | 0xffff |
|
|
28
|
+
| action_length | 16 |
|
|
29
|
+
| vendor.to_hex | 0x2320 |
|
|
30
|
+
| subtype | 14 |
|
|
31
|
+
| in_port | 1 |
|
|
32
|
+
| table.to_hex | 0xff |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Feature: Pio::OpenFlow10::PortStats::Request
|
|
2
|
+
@open_flow10
|
|
3
|
+
Scenario: new(:none)
|
|
4
|
+
When I try to create an OpenFlow message with:
|
|
5
|
+
"""
|
|
6
|
+
Pio::OpenFlow10::PortStats::Request.new(:none)
|
|
7
|
+
"""
|
|
8
|
+
Then it should finish successfully
|
|
9
|
+
And the message has the following fields and values:
|
|
10
|
+
| field | value |
|
|
11
|
+
| ofp_version | 1 |
|
|
12
|
+
| message_type | 16 |
|
|
13
|
+
| message_length | 20 |
|
|
14
|
+
| transaction_id | 0 |
|
|
15
|
+
| xid | 0 |
|
|
16
|
+
| stats_type | :port |
|
|
17
|
+
| port | :none |
|
|
18
|
+
|
|
19
|
+
@open_flow10
|
|
20
|
+
Scenario: new(:none, transaction_id: 123)
|
|
21
|
+
When I try to create an OpenFlow message with:
|
|
22
|
+
"""
|
|
23
|
+
Pio::OpenFlow10::PortStats::Request.new(:none, transaction_id: 123)
|
|
24
|
+
"""
|
|
25
|
+
Then it should finish successfully
|
|
26
|
+
And the message has the following fields and values:
|
|
27
|
+
| field | value |
|
|
28
|
+
| ofp_version | 1 |
|
|
29
|
+
| message_type | 16 |
|
|
30
|
+
| message_length | 20 |
|
|
31
|
+
| transaction_id | 123 |
|
|
32
|
+
| xid | 123 |
|
|
33
|
+
| stats_type | :port |
|
|
34
|
+
| port | :none |
|
|
35
|
+
|
|
36
|
+
@open_flow10
|
|
37
|
+
Scenario: read
|
|
38
|
+
When I try to parse a file named "open_flow10/port_stats_request.raw" with "PortStats::Request" class
|
|
39
|
+
Then it should finish successfully
|
|
40
|
+
And the message has the following fields and values:
|
|
41
|
+
| field | value |
|
|
42
|
+
| ofp_version | 1 |
|
|
43
|
+
| message_type | 16 |
|
|
44
|
+
| message_length | 20 |
|
|
45
|
+
| transaction_id | 123 |
|
|
46
|
+
| xid | 123 |
|
|
47
|
+
| stats_type | :port |
|
|
48
|
+
| port | :none |
|
|
Binary file
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Feature: Pio::OpenFlow10::QueueStats::Request
|
|
2
|
+
@open_flow10
|
|
3
|
+
Scenario: new(port: 1, queue_id: 1)
|
|
4
|
+
When I try to create an OpenFlow message with:
|
|
5
|
+
"""
|
|
6
|
+
Pio::OpenFlow10::QueueStats::Request.new(port: 1, queue_id: 1)
|
|
7
|
+
"""
|
|
8
|
+
Then it should finish successfully
|
|
9
|
+
And the message has the following fields and values:
|
|
10
|
+
| field | value |
|
|
11
|
+
| ofp_version | 1 |
|
|
12
|
+
| message_type | 16 |
|
|
13
|
+
| message_length | 20 |
|
|
14
|
+
| transaction_id | 0 |
|
|
15
|
+
| xid | 0 |
|
|
16
|
+
| stats_type | :queue |
|
|
17
|
+
| port | 1 |
|
|
18
|
+
| queue_id | 1 |
|
|
19
|
+
|
|
20
|
+
@open_flow10
|
|
21
|
+
Scenario: new(port: 1, queue_id: 1, transaction_id: 123)
|
|
22
|
+
When I try to create an OpenFlow message with:
|
|
23
|
+
"""
|
|
24
|
+
Pio::OpenFlow10::QueueStats::Request.new(port: 1, queue_id: 1, transaction_id: 123)
|
|
25
|
+
"""
|
|
26
|
+
Then it should finish successfully
|
|
27
|
+
And the message has the following fields and values:
|
|
28
|
+
| field | value |
|
|
29
|
+
| ofp_version | 1 |
|
|
30
|
+
| message_type | 16 |
|
|
31
|
+
| message_length | 20 |
|
|
32
|
+
| transaction_id | 123 |
|
|
33
|
+
| xid | 123 |
|
|
34
|
+
| stats_type | :queue |
|
|
35
|
+
| port | 1 |
|
|
36
|
+
| queue_id | 1 |
|
|
37
|
+
|
|
38
|
+
@open_flow10
|
|
39
|
+
Scenario: read
|
|
40
|
+
When I try to parse a file named "open_flow10/queue_stats_request.raw" with "QueueStats::Request" class
|
|
41
|
+
Then it should finish successfully
|
|
42
|
+
And the message has the following fields and values:
|
|
43
|
+
| field | value |
|
|
44
|
+
| ofp_version | 1 |
|
|
45
|
+
| message_type | 16 |
|
|
46
|
+
| message_length | 20 |
|
|
47
|
+
| transaction_id | 123 |
|
|
48
|
+
| xid | 123 |
|
|
49
|
+
| stats_type | :queue |
|
|
50
|
+
| port | :all |
|
|
51
|
+
| queue_id | 1 |
|
|
Binary file
|
|
@@ -8,11 +8,11 @@ Feature: Pio::SendOutPort
|
|
|
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
|
-
| max_length
|
|
11
|
+
| field | value |
|
|
12
|
+
| action_type | 0 |
|
|
13
|
+
| action_length | 8 |
|
|
14
|
+
| port | 1 |
|
|
15
|
+
| max_length | 65535 |
|
|
16
16
|
|
|
17
17
|
Scenario: new(:all)
|
|
18
18
|
When I try to create an OpenFlow action with:
|
|
@@ -21,11 +21,11 @@ Feature: Pio::SendOutPort
|
|
|
21
21
|
"""
|
|
22
22
|
Then it should finish successfully
|
|
23
23
|
And the action has the following fields and values:
|
|
24
|
-
| field
|
|
25
|
-
| action_type
|
|
26
|
-
|
|
|
27
|
-
| port
|
|
28
|
-
| max_length
|
|
24
|
+
| field | value |
|
|
25
|
+
| action_type | 0 |
|
|
26
|
+
| action_length | 8 |
|
|
27
|
+
| port | :all |
|
|
28
|
+
| max_length | 65535 |
|
|
29
29
|
|
|
30
30
|
Scenario: new(:controller)
|
|
31
31
|
When I try to create an OpenFlow action with:
|
|
@@ -34,11 +34,11 @@ Feature: Pio::SendOutPort
|
|
|
34
34
|
"""
|
|
35
35
|
Then it should finish successfully
|
|
36
36
|
And the action has the following fields and values:
|
|
37
|
-
| field
|
|
38
|
-
| action_type
|
|
39
|
-
|
|
|
40
|
-
| port
|
|
41
|
-
| max_length
|
|
37
|
+
| field | value |
|
|
38
|
+
| action_type | 0 |
|
|
39
|
+
| action_length | 8 |
|
|
40
|
+
| port | :controller |
|
|
41
|
+
| max_length | 65535 |
|
|
42
42
|
|
|
43
43
|
Scenario: new(:local)
|
|
44
44
|
When I try to create an OpenFlow action with:
|
|
@@ -47,11 +47,11 @@ Feature: Pio::SendOutPort
|
|
|
47
47
|
"""
|
|
48
48
|
Then it should finish successfully
|
|
49
49
|
And the action has the following fields and values:
|
|
50
|
-
| field
|
|
51
|
-
| action_type
|
|
52
|
-
|
|
|
53
|
-
| port
|
|
54
|
-
| max_length
|
|
50
|
+
| field | value |
|
|
51
|
+
| action_type | 0 |
|
|
52
|
+
| action_length | 8 |
|
|
53
|
+
| port | :local |
|
|
54
|
+
| max_length | 65535 |
|
|
55
55
|
|
|
56
56
|
Scenario: new(:table)
|
|
57
57
|
When I try to create an OpenFlow action with:
|
|
@@ -60,11 +60,11 @@ Feature: Pio::SendOutPort
|
|
|
60
60
|
"""
|
|
61
61
|
Then it should finish successfully
|
|
62
62
|
And the action has the following fields and values:
|
|
63
|
-
| field
|
|
64
|
-
| action_type
|
|
65
|
-
|
|
|
66
|
-
| port
|
|
67
|
-
| max_length
|
|
63
|
+
| field | value |
|
|
64
|
+
| action_type | 0 |
|
|
65
|
+
| action_length | 8 |
|
|
66
|
+
| port | :table |
|
|
67
|
+
| max_length | 65535 |
|
|
68
68
|
|
|
69
69
|
Scenario: new(:in_port)
|
|
70
70
|
When I try to create an OpenFlow action with:
|
|
@@ -73,11 +73,11 @@ Feature: Pio::SendOutPort
|
|
|
73
73
|
"""
|
|
74
74
|
Then it should finish successfully
|
|
75
75
|
And the action has the following fields and values:
|
|
76
|
-
| field
|
|
77
|
-
| action_type
|
|
78
|
-
|
|
|
79
|
-
| port
|
|
80
|
-
| max_length
|
|
76
|
+
| field | value |
|
|
77
|
+
| action_type | 0 |
|
|
78
|
+
| action_length | 8 |
|
|
79
|
+
| port | :in_port |
|
|
80
|
+
| max_length | 65535 |
|
|
81
81
|
|
|
82
82
|
Scenario: new(:normal)
|
|
83
83
|
When I try to create an OpenFlow action with:
|
|
@@ -86,11 +86,11 @@ Feature: Pio::SendOutPort
|
|
|
86
86
|
"""
|
|
87
87
|
Then it should finish successfully
|
|
88
88
|
And the action has the following fields and values:
|
|
89
|
-
| field
|
|
90
|
-
| action_type
|
|
91
|
-
|
|
|
92
|
-
| port
|
|
93
|
-
| max_length
|
|
89
|
+
| field | value |
|
|
90
|
+
| action_type | 0 |
|
|
91
|
+
| action_length | 8 |
|
|
92
|
+
| port | :normal |
|
|
93
|
+
| max_length | 65535 |
|
|
94
94
|
|
|
95
95
|
Scenario: new(:flood)
|
|
96
96
|
When I try to create an OpenFlow action with:
|
|
@@ -99,8 +99,8 @@ Feature: Pio::SendOutPort
|
|
|
99
99
|
"""
|
|
100
100
|
Then it should finish successfully
|
|
101
101
|
And the action has the following fields and values:
|
|
102
|
-
| field
|
|
103
|
-
| action_type
|
|
104
|
-
|
|
|
105
|
-
| port
|
|
106
|
-
| max_length
|
|
102
|
+
| field | value |
|
|
103
|
+
| action_type | 0 |
|
|
104
|
+
| action_length | 8 |
|
|
105
|
+
| port | :flood |
|
|
106
|
+
| max_length | 65535 |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@open_flow10
|
|
2
|
+
Feature: Pio::OpenFlow10::SetDestinationMacAddress
|
|
3
|
+
|
|
4
|
+
Scenario: new('11:22:33:44:55:66')
|
|
5
|
+
When I try to create an OpenFlow action with:
|
|
6
|
+
"""
|
|
7
|
+
Pio::OpenFlow10::SetDestinationMacAddress.new('11:22:33:44:55:66')
|
|
8
|
+
"""
|
|
9
|
+
Then it should finish successfully
|
|
10
|
+
And the action has the following fields and values:
|
|
11
|
+
| field | value |
|
|
12
|
+
| action_type | 5 |
|
|
13
|
+
| action_length | 16 |
|
|
14
|
+
| mac_address | 11:22:33:44:55:66 |
|
|
15
|
+
|
|
16
|
+
|