pio 0.23.1 → 0.24.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 +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
@@ -1,3 +1,4 @@
|
|
1
|
+
@open_flow10
|
1
2
|
Feature: Pio::Features::Reply
|
2
3
|
Scenario: new
|
3
4
|
When I try to create an OpenFlow message with:
|
@@ -21,76 +22,74 @@ Feature: Pio::Features::Reply
|
|
21
22
|
"""
|
22
23
|
Then it should finish successfully
|
23
24
|
And the message have the following fields and values:
|
24
|
-
| field |
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| capabilities | [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip] |
|
25
|
+
| field | value |
|
26
|
+
| ofp_version | 1 |
|
27
|
+
| message_type | 6 |
|
28
|
+
| message_length | 80 |
|
29
|
+
| transaction_id | 0 |
|
30
|
+
| xid | 0 |
|
31
|
+
| datapath_id | 291 |
|
32
|
+
| dpid | 291 |
|
33
|
+
| n_buffers | 256 |
|
34
|
+
| n_tables | 254 |
|
35
|
+
| capabilities | [:flow_stats, :table_stats, :port_stats, :queue_stats, :arp_match_ip] |
|
36
36
|
| 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] |
|
37
|
-
| ports.length |
|
38
|
-
| ports.first.datapath_id |
|
39
|
-
| ports.first.port_no |
|
40
|
-
| ports.first.mac_address |
|
41
|
-
| ports.first.hardware_address |
|
42
|
-
| ports.first.name |
|
43
|
-
| ports.first.config |
|
44
|
-
| ports.first.state |
|
45
|
-
| ports.first.curr |
|
46
|
-
| ports.first.advertised |
|
47
|
-
| ports.first.supported |
|
48
|
-
| ports.first.peer |
|
37
|
+
| ports.length | 1 |
|
38
|
+
| ports.first.datapath_id | 291 |
|
39
|
+
| ports.first.port_no | 1 |
|
40
|
+
| ports.first.mac_address | 11:22:33:44:55:66 |
|
41
|
+
| ports.first.hardware_address | 11:22:33:44:55:66 |
|
42
|
+
| ports.first.name | port123 |
|
43
|
+
| ports.first.config | [:port_down] |
|
44
|
+
| ports.first.state | [:link_down] |
|
45
|
+
| ports.first.curr | [:port_10gb_fd, :port_copper] |
|
46
|
+
| ports.first.advertised | [] |
|
47
|
+
| ports.first.supported | [] |
|
48
|
+
| ports.first.peer | [] |
|
49
49
|
|
50
50
|
Scenario: read
|
51
51
|
When I try to parse a file named "open_flow10/features_reply.raw" with "Features::Reply" class
|
52
52
|
Then it should finish successfully
|
53
53
|
And the message have the following fields and values:
|
54
|
-
| field | value
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| capabilities | [:flow_stats, :table_stats, :port_stats, :arp_match_ip] |
|
54
|
+
| field | value |
|
55
|
+
| ofp_version | 1 |
|
56
|
+
| message_type | 6 |
|
57
|
+
| message_length | 176 |
|
58
|
+
| transaction_id | 2 |
|
59
|
+
| xid | 2 |
|
60
|
+
| datapath_id | 1 |
|
61
|
+
| dpid | 1 |
|
62
|
+
| n_buffers | 256 |
|
63
|
+
| n_tables | 1 |
|
64
|
+
| capabilities | [:flow_stats, :table_stats, :port_stats, :arp_match_ip] |
|
66
65
|
| 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] |
|
67
|
-
| ports.length | 3
|
68
|
-
| ports.first.datapath_id | 1
|
69
|
-
| ports.first.port_no | 2
|
70
|
-
| ports.first.mac_address | 16:7d:a4:37:ba:10
|
71
|
-
| ports.first.hardware_address | 16:7d:a4:37:ba:10
|
72
|
-
| ports.first.name | trema0-0
|
73
|
-
| ports.first.config | []
|
74
|
-
| ports.first.state | []
|
75
|
-
| ports.first.curr | [:port_10gb_fd, :port_copper]
|
76
|
-
| ports.first.advertised | []
|
77
|
-
| ports.first.supported | []
|
78
|
-
| ports.first.peer | []
|
79
|
-
| ports.last.port_no | 1
|
80
|
-
| ports.last.number | 1
|
81
|
-
| ports.last.mac_address | 62:94:3a:f6:40:db
|
82
|
-
| ports.last.hardware_address | 62:94:3a:f6:40:db
|
83
|
-
| ports.last.name | trema1-0
|
84
|
-
| ports.last.config | []
|
85
|
-
| ports.last.state | []
|
86
|
-
| ports.last.curr | [:port_10gb_fd, :port_copper]
|
87
|
-
| ports.last.advertised | []
|
88
|
-
| ports.last.supported | []
|
89
|
-
| ports.last.peer | []
|
90
|
-
| ports.last.up? | true
|
91
|
-
| ports.last.down? | false
|
92
|
-
| ports.last.local? | false
|
66
|
+
| ports.length | 3 |
|
67
|
+
| ports.first.datapath_id | 1 |
|
68
|
+
| ports.first.port_no | 2 |
|
69
|
+
| ports.first.mac_address | 16:7d:a4:37:ba:10 |
|
70
|
+
| ports.first.hardware_address | 16:7d:a4:37:ba:10 |
|
71
|
+
| ports.first.name | trema0-0 |
|
72
|
+
| ports.first.config | [] |
|
73
|
+
| ports.first.state | [] |
|
74
|
+
| ports.first.curr | [:port_10gb_fd, :port_copper] |
|
75
|
+
| ports.first.advertised | [] |
|
76
|
+
| ports.first.supported | [] |
|
77
|
+
| ports.first.peer | [] |
|
78
|
+
| ports.last.port_no | 1 |
|
79
|
+
| ports.last.number | 1 |
|
80
|
+
| ports.last.mac_address | 62:94:3a:f6:40:db |
|
81
|
+
| ports.last.hardware_address | 62:94:3a:f6:40:db |
|
82
|
+
| ports.last.name | trema1-0 |
|
83
|
+
| ports.last.config | [] |
|
84
|
+
| ports.last.state | [] |
|
85
|
+
| ports.last.curr | [:port_10gb_fd, :port_copper] |
|
86
|
+
| ports.last.advertised | [] |
|
87
|
+
| ports.last.supported | [] |
|
88
|
+
| ports.last.peer | [] |
|
89
|
+
| ports.last.up? | true |
|
90
|
+
| ports.last.down? | false |
|
91
|
+
| ports.last.local? | false |
|
93
92
|
|
94
93
|
Scenario: parse error
|
95
94
|
When I try to parse a file named "open_flow10/echo_reply.raw" with "Pio::Features::Reply" class
|
96
|
-
Then it should fail with "Pio::ParseError", "Invalid Features Reply message."
|
95
|
+
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Features Reply message."
|
@@ -1,3 +1,4 @@
|
|
1
|
+
@open_flow10
|
1
2
|
Feature: Pio::Features::Request
|
2
3
|
Scenario: new
|
3
4
|
When I try to create an OpenFlow message with:
|
@@ -7,7 +8,6 @@ Feature: Pio::Features::Request
|
|
7
8
|
Then it should finish successfully
|
8
9
|
And the message have the following fields and values:
|
9
10
|
| field | value |
|
10
|
-
| class | Pio::Features::Request |
|
11
11
|
| ofp_version | 1 |
|
12
12
|
| message_type | 5 |
|
13
13
|
| message_length | 8 |
|
@@ -23,7 +23,6 @@ Feature: Pio::Features::Request
|
|
23
23
|
Then it should finish successfully
|
24
24
|
And the message have the following fields and values:
|
25
25
|
| field | value |
|
26
|
-
| class | Pio::Features::Request |
|
27
26
|
| ofp_version | 1 |
|
28
27
|
| message_type | 5 |
|
29
28
|
| message_length | 8 |
|
@@ -39,7 +38,6 @@ Feature: Pio::Features::Request
|
|
39
38
|
Then it should finish successfully
|
40
39
|
And the message have the following fields and values:
|
41
40
|
| field | value |
|
42
|
-
| class | Pio::Features::Request |
|
43
41
|
| ofp_version | 1 |
|
44
42
|
| message_type | 5 |
|
45
43
|
| message_length | 8 |
|
@@ -47,26 +45,11 @@ Feature: Pio::Features::Request
|
|
47
45
|
| xid | 123 |
|
48
46
|
| user_data | |
|
49
47
|
|
50
|
-
Scenario: new(xid: -1) and error
|
51
|
-
When I try to create an OpenFlow message with:
|
52
|
-
"""
|
53
|
-
Pio::Features::Request.new(xid: -1)
|
54
|
-
"""
|
55
|
-
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
56
|
-
|
57
|
-
Scenario: new(xid: 2**32) and error
|
58
|
-
When I try to create an OpenFlow message with:
|
59
|
-
"""
|
60
|
-
Pio::Features::Request.new(xid: 2**32)
|
61
|
-
"""
|
62
|
-
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
63
|
-
|
64
48
|
Scenario: read
|
65
49
|
When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Features::Request" class
|
66
50
|
Then it should finish successfully
|
67
51
|
And the message have the following fields and values:
|
68
52
|
| field | value |
|
69
|
-
| class | Pio::Features::Request |
|
70
53
|
| ofp_version | 1 |
|
71
54
|
| message_type | 5 |
|
72
55
|
| message_length | 8 |
|
@@ -76,4 +59,4 @@ Feature: Pio::Features::Request
|
|
76
59
|
|
77
60
|
Scenario: parse error
|
78
61
|
When I try to parse a file named "open_flow10/echo_request.raw" with "Pio::Features::Request" class
|
79
|
-
Then it should fail with "Pio::ParseError", "Invalid Features Request message."
|
62
|
+
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Features Request message."
|
@@ -1,3 +1,4 @@
|
|
1
|
+
@open_flow10
|
1
2
|
Feature: Pio::Hello
|
2
3
|
Scenario: new
|
3
4
|
When I try to create an OpenFlow message with:
|
@@ -6,14 +7,14 @@ Feature: Pio::Hello
|
|
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
|
-
|
|
10
|
+
| field | value |
|
11
|
+
| ofp_version | 1 |
|
12
|
+
| message_type | 0 |
|
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,15 +23,15 @@ Feature: Pio::Hello
|
|
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
|
-
|
|
33
|
-
|
26
|
+
| field | value |
|
27
|
+
| ofp_version | 1 |
|
28
|
+
| message_type | 0 |
|
29
|
+
| message_length | 8 |
|
30
|
+
| transaction_id | 123 |
|
31
|
+
| xid | 123 |
|
32
|
+
| body | |
|
33
|
+
| user_data | |
|
34
|
+
|
34
35
|
Scenario: new(xid: 123)
|
35
36
|
When I try to create an OpenFlow message with:
|
36
37
|
"""
|
@@ -38,42 +39,35 @@ Feature: Pio::Hello
|
|
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
|
-
|
|
49
|
-
|
50
|
-
Scenario: new(xid: -1) and error
|
51
|
-
When I try to create an OpenFlow message with:
|
52
|
-
"""
|
53
|
-
Pio::Hello.new(xid: -1)
|
54
|
-
"""
|
55
|
-
Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
|
42
|
+
| field | value |
|
43
|
+
| ofp_version | 1 |
|
44
|
+
| message_type | 0 |
|
45
|
+
| message_length | 8 |
|
46
|
+
| transaction_id | 123 |
|
47
|
+
| xid | 123 |
|
48
|
+
| body | |
|
49
|
+
| user_data | |
|
56
50
|
|
57
|
-
Scenario: new(
|
51
|
+
Scenario: new(unknown_attr: 'foo') and error
|
58
52
|
When I try to create an OpenFlow message with:
|
59
53
|
"""
|
60
|
-
Pio::Hello.new(
|
54
|
+
Pio::Hello.new(unknown_attr: 'foo')
|
61
55
|
"""
|
62
|
-
Then it should fail with "
|
56
|
+
Then it should fail with "RuntimeError", "Unknown option: unknown_attr"
|
63
57
|
|
64
58
|
Scenario: read
|
65
59
|
When I try to parse a file named "open_flow10/hello.raw" with "Hello" class
|
66
60
|
Then it should finish successfully
|
67
61
|
And the message have the following fields and values:
|
68
|
-
| field |
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
62
|
+
| field | value |
|
63
|
+
| ofp_version | 1 |
|
64
|
+
| message_type | 0 |
|
65
|
+
| message_length | 8 |
|
66
|
+
| transaction_id | 23 |
|
67
|
+
| xid | 23 |
|
68
|
+
| body | |
|
69
|
+
| user_data | |
|
76
70
|
|
77
71
|
Scenario: parse error
|
78
72
|
When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Hello" class
|
79
|
-
Then it should fail with "Pio::ParseError", "Invalid Hello message."
|
73
|
+
Then it should fail with "Pio::ParseError", "Invalid OpenFlow10 Hello message."
|
@@ -1,3 +1,4 @@
|
|
1
|
+
@open_flow10
|
1
2
|
Feature: Pio::PacketIn
|
2
3
|
Scenario: new
|
3
4
|
When I try to create an OpenFlow message with:
|
@@ -20,7 +21,6 @@ Feature: Pio::PacketIn
|
|
20
21
|
Then it should finish successfully
|
21
22
|
And the message have the following fields and values:
|
22
23
|
| field | value |
|
23
|
-
| class | Pio::PacketIn |
|
24
24
|
| ofp_version | 1 |
|
25
25
|
| message_type | 10 |
|
26
26
|
| message_length | 78 |
|
@@ -41,7 +41,6 @@ Feature: Pio::PacketIn
|
|
41
41
|
Then it should finish successfully
|
42
42
|
And the message have the following fields and values:
|
43
43
|
| field | value |
|
44
|
-
| class | Pio::PacketIn |
|
45
44
|
| ofp_version | 1 |
|
46
45
|
| message_type | 10 |
|
47
46
|
| message_length | 78 |
|
Binary file
|
@@ -1,19 +1,19 @@
|
|
1
|
+
@open_flow10
|
1
2
|
Feature: Pio::PacketOut
|
2
3
|
Scenario: read
|
3
4
|
When I try to parse a file named "open_flow10/packet_out.raw" with "PacketOut" class
|
4
5
|
Then it should finish successfully
|
5
6
|
And the message have the following fields and values:
|
6
|
-
| field |
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
| actions.
|
16
|
-
| actions.first.
|
17
|
-
| actions.first.
|
18
|
-
|
|
19
|
-
| raw_data.length | 64 |
|
7
|
+
| field | value |
|
8
|
+
| ofp_version | 1 |
|
9
|
+
| message_type | 13 |
|
10
|
+
| message_length | 88 |
|
11
|
+
| transaction_id | 22 |
|
12
|
+
| xid | 22 |
|
13
|
+
| buffer_id | 4294967295 |
|
14
|
+
| in_port | 65535 |
|
15
|
+
| actions.length | 1 |
|
16
|
+
| actions.first.class | Pio::OpenFlow10::SendOutPort |
|
17
|
+
| actions.first.port_number | 2 |
|
18
|
+
| actions.first.max_len | 65535 |
|
19
|
+
| raw_data.length | 64 |
|
@@ -3,21 +3,21 @@ Feature: Pio::PortStatus
|
|
3
3
|
When I try to parse a file named "open_flow10/port_status.raw" with "PortStatus" class
|
4
4
|
Then it should finish successfully
|
5
5
|
And the message have the following fields and values:
|
6
|
-
| field | value
|
7
|
-
| class | Pio::PortStatus
|
8
|
-
| ofp_version | 1
|
9
|
-
| message_type | 12
|
10
|
-
| message_length | 64
|
11
|
-
| transaction_id | 4
|
12
|
-
| xid | 4
|
13
|
-
| reason | :delete
|
14
|
-
| desc.port_no | 65533
|
15
|
-
| desc.hardware_address | 01:02:03:04:05:06
|
16
|
-
| desc.name | foo
|
17
|
-
| desc.config | [:no_flood]
|
18
|
-
| desc.state | [:stp_forward, :stp_block]
|
19
|
-
| desc.curr | [:port_10mb_hd]
|
20
|
-
| desc.advertised | [:port_1gb_fd]
|
21
|
-
| desc.supported | [:port_autoneg]
|
22
|
-
| desc.peer | [:port_pause_asym]
|
6
|
+
| field | value |
|
7
|
+
| class | Pio::OpenFlow10::PortStatus |
|
8
|
+
| ofp_version | 1 |
|
9
|
+
| message_type | 12 |
|
10
|
+
| message_length | 64 |
|
11
|
+
| transaction_id | 4 |
|
12
|
+
| xid | 4 |
|
13
|
+
| reason | :delete |
|
14
|
+
| desc.port_no | 65533 |
|
15
|
+
| desc.hardware_address | 01:02:03:04:05:06 |
|
16
|
+
| desc.name | foo |
|
17
|
+
| desc.config | [:no_flood] |
|
18
|
+
| desc.state | [:stp_forward, :stp_block] |
|
19
|
+
| desc.curr | [:port_10mb_hd] |
|
20
|
+
| desc.advertised | [:port_1gb_fd] |
|
21
|
+
| desc.supported | [:port_autoneg] |
|
22
|
+
| desc.peer | [:port_pause_asym] |
|
23
23
|
|
@@ -1,7 +1,5 @@
|
|
1
|
+
@open_flow13
|
1
2
|
Feature: Apply-Actions instruction.
|
2
|
-
Background:
|
3
|
-
Given I use OpenFlow 1.3
|
4
|
-
|
5
3
|
Scenario: new()
|
6
4
|
When I try to create an OpenFlow instruction with:
|
7
5
|
"""
|
@@ -22,22 +20,22 @@ Feature: Apply-Actions instruction.
|
|
22
20
|
"""
|
23
21
|
Then it should finish successfully
|
24
22
|
And the message have the following fields and values:
|
25
|
-
| field |
|
26
|
-
| class |
|
27
|
-
| instruction_type |
|
28
|
-
| instruction_length |
|
29
|
-
| actions.size |
|
30
|
-
| actions.at(0).class | Pio::SendOutPort |
|
31
|
-
| actions.at(0).port |
|
23
|
+
| field | value |
|
24
|
+
| class | Pio::Apply |
|
25
|
+
| instruction_type | 4 |
|
26
|
+
| instruction_length | 24 |
|
27
|
+
| actions.size | 1 |
|
28
|
+
| actions.at(0).class | Pio::OpenFlow13::SendOutPort |
|
29
|
+
| actions.at(0).port | 1 |
|
32
30
|
|
33
31
|
Scenario: read
|
34
32
|
When I try to parse a file named "open_flow13/apply_actions.raw" with "Pio::Apply" class
|
35
33
|
Then it should finish successfully
|
36
34
|
And the message have the following fields and values:
|
37
|
-
| field |
|
38
|
-
| class |
|
39
|
-
| instruction_type |
|
40
|
-
| instruction_length |
|
41
|
-
| actions.size |
|
42
|
-
| actions.at(0).class | Pio::SendOutPort |
|
43
|
-
| actions.at(0).port |
|
35
|
+
| field | value |
|
36
|
+
| class | Pio::Apply |
|
37
|
+
| instruction_type | 4 |
|
38
|
+
| instruction_length | 24 |
|
39
|
+
| actions.size | 1 |
|
40
|
+
| actions.at(0).class | Pio::OpenFlow13::SendOutPort |
|
41
|
+
| actions.at(0).port | 1 |
|