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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +2 -0
  4. data/Rakefile +1 -1
  5. data/features/open_flow10/barrier_reply.feature +58 -0
  6. data/features/open_flow10/barrier_request.feature +58 -0
  7. data/features/open_flow10/echo_reply.feature +50 -40
  8. data/features/open_flow10/echo_request.feature +54 -51
  9. data/features/open_flow10/features_reply.feature +62 -63
  10. data/features/open_flow10/features_request.feature +2 -19
  11. data/features/open_flow10/flow_mod.feature +1 -0
  12. data/features/open_flow10/hello.feature +38 -44
  13. data/features/open_flow10/packet_in.feature +1 -2
  14. data/features/open_flow10/packet_in.raw +0 -0
  15. data/features/open_flow10/packet_out.feature +14 -14
  16. data/features/open_flow10/port_status.feature +17 -17
  17. data/features/open_flow13/apply_actions.feature +15 -17
  18. data/features/open_flow13/echo_reply.feature +58 -58
  19. data/features/open_flow13/echo_request.feature +58 -58
  20. data/features/open_flow13/features_reply.feature +2 -6
  21. data/features/open_flow13/features_request.feature +3 -23
  22. data/features/open_flow13/flow_mod.feature +86 -93
  23. data/features/open_flow13/goto_table.feature +4 -4
  24. data/features/open_flow13/hello.feature +8 -15
  25. data/features/open_flow13/match.feature +14 -3
  26. data/features/open_flow13/meter.feature +3 -3
  27. data/features/open_flow13/oxm_experimenter_stratos_basic_dot11.raw +0 -0
  28. data/features/open_flow13/oxm_invalid_field.raw +0 -0
  29. data/features/open_flow13/packet_in.feature +15 -20
  30. data/features/open_flow13/packet_out.feature +39 -42
  31. data/features/open_flow13/send_out_port.feature +1 -5
  32. data/features/open_flow13/write_metadata.feature +3 -3
  33. data/features/open_flow_read.feature +43 -0
  34. data/features/open_flow_version.feature +10 -0
  35. data/features/step_definitions/open_flow_steps.rb +10 -2
  36. data/features/step_definitions/packet_data_steps.rb +4 -0
  37. data/features/support/hooks.rb +7 -0
  38. data/lib/pio.rb +1 -1
  39. data/lib/pio/monkey_patch/integer/ranges.rb +4 -0
  40. data/lib/pio/open_flow.rb +54 -16
  41. data/lib/pio/open_flow/datapath_id.rb +26 -0
  42. data/lib/pio/open_flow/echo.rb +44 -0
  43. data/lib/pio/open_flow/format.rb +45 -0
  44. data/lib/pio/open_flow/message.rb +88 -0
  45. data/lib/pio/open_flow/open_flow_header.rb +0 -14
  46. data/lib/pio/open_flow10.rb +3 -8
  47. data/lib/pio/open_flow10/actions.rb +1 -1
  48. data/lib/pio/open_flow10/barrier_reply.rb +21 -0
  49. data/lib/pio/open_flow10/barrier_request.rb +22 -0
  50. data/lib/pio/open_flow10/echo.rb +15 -11
  51. data/lib/pio/open_flow10/features.rb +99 -71
  52. data/lib/pio/open_flow10/flow_mod.rb +73 -66
  53. data/lib/pio/open_flow10/hello.rb +19 -4
  54. data/lib/pio/open_flow10/match.rb +133 -131
  55. data/lib/pio/open_flow10/packet_in.rb +55 -49
  56. data/lib/pio/open_flow10/packet_out.rb +31 -24
  57. data/lib/pio/open_flow10/port_status.rb +54 -27
  58. data/lib/pio/open_flow10/send_out_port.rb +66 -64
  59. data/lib/pio/open_flow13.rb +0 -15
  60. data/lib/pio/open_flow13/echo.rb +11 -68
  61. data/lib/pio/open_flow13/features_reply.rb +48 -77
  62. data/lib/pio/open_flow13/features_request.rb +16 -45
  63. data/lib/pio/open_flow13/flow_mod.rb +125 -148
  64. data/lib/pio/open_flow13/goto_table.rb +1 -0
  65. data/lib/pio/open_flow13/hello.rb +54 -84
  66. data/lib/pio/open_flow13/match.rb +69 -11
  67. data/lib/pio/open_flow13/meter.rb +1 -0
  68. data/lib/pio/open_flow13/packet_in.rb +38 -50
  69. data/lib/pio/open_flow13/packet_out.rb +50 -75
  70. data/lib/pio/open_flow13/send_out_port.rb +34 -34
  71. data/lib/pio/open_flow13/write_metadata.rb +1 -0
  72. data/lib/pio/parser.rb +3 -0
  73. data/lib/pio/version.rb +1 -1
  74. data/pio.gemspec +6 -6
  75. data/spec/pio/open_flow10/echo_reply_spec.rb +7 -0
  76. data/spec/pio/open_flow10/echo_request_spec.rb +7 -0
  77. data/spec/pio/open_flow10/features_reply_spec.rb +8 -0
  78. data/spec/pio/open_flow10/features_request_spec.rb +13 -0
  79. data/spec/pio/open_flow10/flow_mod_spec.rb +17 -16
  80. data/spec/pio/open_flow10/hello_spec.rb +7 -0
  81. data/spec/pio/open_flow10/match_spec.rb +8 -6
  82. data/spec/pio/open_flow10/packet_in_spec.rb +14 -0
  83. data/spec/pio/open_flow10/packet_out_spec.rb +21 -14
  84. data/spec/pio/open_flow10/send_out_port_spec.rb +4 -4
  85. data/spec/pio/open_flow10/wildcards_spec.rb +2 -2
  86. data/spec/pio/open_flow13/echo_reply_spec.rb +7 -0
  87. data/spec/pio/open_flow13/echo_request_spec.rb +7 -0
  88. data/spec/pio/open_flow13/features_reply_spec.rb +8 -0
  89. data/spec/pio/open_flow13/features_request_spec.rb +13 -0
  90. data/spec/pio/open_flow13/hello_spec.rb +14 -59
  91. data/spec/pio/open_flow13/packet_in_spec.rb +14 -0
  92. data/spec/pio/open_flow13/packet_out_spec.rb +7 -0
  93. data/spec/pio/open_flow_spec.rb +34 -0
  94. data/spec/spec_helper.rb +1 -0
  95. data/spec/support/shared_examples_for_openflow_messages.rb +75 -0
  96. metadata +215 -170
  97. data/bin/byebug +0 -16
  98. data/bin/terminal-notifier +0 -16
  99. data/lib/pio/open_flow10/message.rb +0 -78
  100. 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: c397c31f611e35a0332847bf82a1cdcf21255c13
4
- data.tar.gz: 2428759d84030c576783f636e0efafc8a55907e9
3
+ metadata.gz: ef1bd0a6c467983ccca7761a5672cf8dce7e5136
4
+ data.tar.gz: d7a9f2fbf5f25f5d00d6663ef9ad02db9c362295
5
5
  SHA512:
6
- metadata.gz: 537153aeeff9b7dbe003cf4a9a8983ed48164c54780b0fa518f2b87f8dd0d63929fc537ed6b4eeaaac74c04aba560ffd8c3f85f60b760526b1f678ea1f6ed500
7
- data.tar.gz: dbb9eb250b1ac05a2509803651433abb2a9934547ae8dceb68d0778fea8eb92d0c1dc85010a8f33d49cfc20949310e8e025183701a8ed161ff3942b311857aa8
6
+ metadata.gz: 07895e734c22b8802e9c9761534fced81cdaa80100486dca3ff9d11abf4c577f61a9bad7aac1de0e560ea34176bd77d2e71cf6f73158cf76da8a6dcb9a6a4055
7
+ data.tar.gz: f1c35e1cb7726c0048b331595f30e4b12f6e961bdf489851c46f7174d550a2736d2d4b9fc3c3f9b6672964f4b7411ccbf25fbf847942b5a7b5e267d4cfd16211
@@ -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
@@ -1,7 +1,7 @@
1
1
  require 'bundler/gem_tasks'
2
2
 
3
3
  RELISH_PROJECT = 'trema/pio'
4
- FLAY_THRESHOLD = 452
4
+ FLAY_THRESHOLD = 526
5
5
 
6
6
  task default: :travis
7
7
  task test: [:spec, :cucumber]
@@ -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 | value |
10
- | class | Pio::Echo::Reply |
11
- | ofp_version | 1 |
12
- | message_type | 3 |
13
- | message_length | 8 |
14
- | transaction_id | 0 |
15
- | xid | 0 |
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 | value |
26
- | class | Pio::Echo::Reply |
27
- | ofp_version | 1 |
28
- | message_type | 3 |
29
- | message_length | 8 |
30
- | transaction_id | 123 |
31
- | xid | 123 |
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 | value |
42
- | class | Pio::Echo::Reply |
43
- | ofp_version | 1 |
44
- | message_type | 3 |
45
- | message_length | 8 |
46
- | transaction_id | 123 |
47
- | xid | 123 |
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(xid: -1) and error
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(xid: -1)
54
+ Pio::Echo::Reply.new(unknown_attr: 'foo')
54
55
  """
55
- Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
56
+ Then it should fail with "RuntimeError", "Unknown option: unknown_attr"
56
57
 
57
- Scenario: new(xid: 2**32) and error
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(xid: 2**32)
61
+ Pio::Echo::Reply.new(body: 'echo reply body')
61
62
  """
62
- Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
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 | value |
72
- | class | Pio::Echo::Reply |
73
- | ofp_version | 1 |
74
- | message_type | 3 |
75
- | message_length | 23 |
76
- | transaction_id | 0 |
77
- | xid | 0 |
78
- | user_data | echo reply body |
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 | value |
10
- | class | Pio::Echo::Request |
11
- | ofp_version | 1 |
12
- | message_type | 2 |
13
- | message_length | 8 |
14
- | transaction_id | 0 |
15
- | xid | 0 |
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 | value |
26
- | class | Pio::Echo::Request |
27
- | ofp_version | 1 |
28
- | message_type | 2 |
29
- | message_length | 8 |
30
- | transaction_id | 123 |
31
- | xid | 123 |
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 | value |
42
- | class | Pio::Echo::Request |
43
- | ofp_version | 1 |
44
- | message_type | 2 |
45
- | message_length | 8 |
46
- | transaction_id | 123 |
47
- | xid | 123 |
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(xid: -1) and error
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(xid: -1)
54
+ Pio::Echo::Request.new(body: 'echo request body')
54
55
  """
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::Echo::Request.new(xid: 2**32)
61
- """
62
- Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
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 | value |
72
- | class | Pio::Echo::Request |
73
- | ofp_version | 1 |
74
- | message_type | 2 |
75
- | message_length | 25 |
76
- | transaction_id | 0 |
77
- | xid | 0 |
78
- | user_data | echo request body |
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 | value |
85
- | class | Pio::Echo::Request |
86
- | ofp_version | 1 |
87
- | message_type | 2 |
88
- | message_length | 8 |
89
- | transaction_id | 0 |
90
- | xid | 0 |
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."