pio 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +20 -18
  4. data/features/{packet_data/arp-storm.pcap → arp-storm.pcap} +0 -0
  5. data/features/arp.feature +1 -1
  6. data/features/{packet_data/arp.pcap → arp.pcap} +0 -0
  7. data/features/dhcp.feature +210 -3
  8. data/features/{packet_data/dhcp.pcap → dhcp.pcap} +0 -0
  9. data/features/icmp.feature +1 -1
  10. data/features/{packet_data/icmp.pcap → icmp.pcap} +0 -0
  11. data/features/{packet_data/lldp.detailed.pcap → lldp.detailed.pcap} +0 -0
  12. data/features/lldp.feature +5 -5
  13. data/features/{packet_data/lldp.minimal.pcap → lldp.minimal.pcap} +0 -0
  14. data/features/{packet_data → open_flow10}/aggregate_stats_reply.raw +0 -0
  15. data/features/{packet_data → open_flow10}/aggregate_stats_request.raw +0 -0
  16. data/features/{packet_data → open_flow10}/barrier_reply.raw +0 -0
  17. data/features/{packet_data → open_flow10}/barrier_request.raw +0 -0
  18. data/features/{packet_data → open_flow10}/desc_stats_reply.raw +0 -0
  19. data/features/{packet_data → open_flow10}/desc_stats_request.raw +0 -0
  20. data/features/open_flow10/echo_reply.feature +10 -10
  21. data/features/{packet_data → open_flow10}/echo_reply.raw +0 -0
  22. data/features/open_flow10/echo_request.feature +10 -10
  23. data/features/{packet_data → open_flow10}/echo_request.raw +0 -0
  24. data/features/{packet_data → open_flow10}/error.raw +0 -0
  25. data/features/open_flow10/exact_match.feature +33 -33
  26. data/features/open_flow10/features_reply.feature +71 -71
  27. data/features/{packet_data → open_flow10}/features_reply.raw +0 -0
  28. data/features/open_flow10/features_request.feature +9 -9
  29. data/features/{packet_data → open_flow10}/features_request.raw +0 -0
  30. data/features/open_flow10/flow_mod.feature +167 -167
  31. data/features/{packet_data → open_flow10}/flow_mod_add.raw +0 -0
  32. data/features/{packet_data → open_flow10}/flow_mod_delete.raw +0 -0
  33. data/features/{packet_data → open_flow10}/flow_mod_delete_strict.raw +0 -0
  34. data/features/{packet_data → open_flow10}/flow_mod_modify.raw +0 -0
  35. data/features/{packet_data → open_flow10}/flow_mod_modify_strict.raw +0 -0
  36. data/features/{packet_data → open_flow10}/flow_removed.raw +0 -0
  37. data/features/{packet_data → open_flow10}/flow_stats_reply.raw +0 -0
  38. data/features/{packet_data → open_flow10}/flow_stats_request.raw +0 -0
  39. data/features/{packet_data → open_flow10}/get_config_reply.raw +0 -0
  40. data/features/{packet_data → open_flow10}/get_config_request.raw +0 -0
  41. data/features/open_flow10/hello.feature +9 -9
  42. data/features/{packet_data → open_flow10}/hello.raw +0 -0
  43. data/features/open_flow10/packet_in.feature +4 -4
  44. data/features/{packet_data → open_flow10}/packet_in_arp_request.raw +0 -0
  45. data/features/{packet_data → open_flow10}/packet_in_cbench.raw +0 -0
  46. data/features/open_flow10/packet_out.feature +3 -3
  47. data/features/{packet_data → open_flow10}/packet_out.raw +0 -0
  48. data/features/{packet_data → open_flow10}/port_mod.raw +0 -0
  49. data/features/{packet_data → open_flow10}/port_stats_reply.raw +0 -0
  50. data/features/{packet_data → open_flow10}/port_stats_request.raw +0 -0
  51. data/features/open_flow10/port_status.feature +3 -3
  52. data/features/{packet_data → open_flow10}/port_status.raw +0 -0
  53. data/features/{packet_data → open_flow10}/queue_get_config_reply.raw +0 -0
  54. data/features/{packet_data → open_flow10}/queue_get_config_request.raw +0 -0
  55. data/features/{packet_data → open_flow10}/set_config.raw +0 -0
  56. data/features/{packet_data → open_flow10}/table_stats_reply.raw +0 -0
  57. data/features/{packet_data → open_flow10}/table_stats_request.raw +0 -0
  58. data/features/{packet_data → open_flow10}/vendor.raw +0 -0
  59. data/features/{packet_data → open_flow10}/vendor_stats_request.raw +0 -0
  60. data/features/open_flow13/echo_reply.feature +64 -61
  61. data/features/{packet_data/echo13_reply_body.raw → open_flow13/echo_reply_body.raw} +0 -0
  62. data/features/{packet_data/echo13_reply_no_body.raw → open_flow13/echo_reply_no_body.raw} +0 -0
  63. data/features/open_flow13/echo_request.feature +64 -61
  64. data/features/{packet_data/echo13_request_body.raw → open_flow13/echo_request_body.raw} +0 -0
  65. data/features/{packet_data/echo13_request_no_body.raw → open_flow13/echo_request_no_body.raw} +0 -0
  66. data/features/open_flow13/features_reply.feature +53 -0
  67. data/features/open_flow13/features_reply.raw +0 -0
  68. data/features/open_flow13/features_request.feature +89 -0
  69. data/features/open_flow13/features_request.raw +0 -0
  70. data/features/open_flow13/hello.feature +26 -23
  71. data/features/{packet_data/hello13_no_version_bitmap.raw → open_flow13/hello_no_version_bitmap.raw} +0 -0
  72. data/features/{packet_data/hello13_version_bitmap.raw → open_flow13/hello_version_bitmap.raw} +0 -0
  73. data/features/step_definitions/open_flow_steps.rb +3 -0
  74. data/features/step_definitions/packet_data_steps.rb +9 -9
  75. data/features/udp.feature +3 -3
  76. data/features/{packet_data/udp_no_payload.raw → udp_no_payload.raw} +0 -0
  77. data/features/{packet_data/udp_with_payload.raw → udp_with_payload.raw} +0 -0
  78. data/lib/pio.rb +1 -9
  79. data/lib/pio/open_flow/actions.rb +8 -8
  80. data/lib/pio/open_flow/open_flow_header.rb +10 -0
  81. data/lib/pio/open_flow10.rb +15 -0
  82. data/lib/pio/open_flow10/echo.rb +15 -0
  83. data/lib/pio/open_flow10/exact_match.rb +51 -0
  84. data/lib/pio/{features.rb → open_flow10/features.rb} +8 -7
  85. data/lib/pio/{flow_mod.rb → open_flow10/flow_mod.rb} +1 -1
  86. data/lib/pio/{hello.rb → open_flow10/hello.rb} +0 -0
  87. data/lib/pio/{match.rb → open_flow10/match.rb} +46 -43
  88. data/lib/pio/{packet_in.rb → open_flow10/packet_in.rb} +0 -0
  89. data/lib/pio/{packet_out.rb → open_flow10/packet_out.rb} +0 -0
  90. data/lib/pio/{port_status.rb → open_flow10/port_status.rb} +0 -0
  91. data/lib/pio/open_flow13.rb +12 -0
  92. data/lib/pio/{echo.rb → open_flow13/echo.rb} +9 -13
  93. data/lib/pio/open_flow13/features_reply.rb +91 -0
  94. data/lib/pio/open_flow13/features_request.rb +54 -0
  95. data/lib/pio/{hello13.rb → open_flow13/hello.rb} +4 -1
  96. data/lib/pio/{set_eth_addr.rb → set_ether_address.rb} +7 -7
  97. data/lib/pio/{set_ip_addr.rb → set_ip_address.rb} +7 -7
  98. data/lib/pio/set_ip_tos.rb +1 -1
  99. data/lib/pio/set_transport_port.rb +2 -2
  100. data/lib/pio/version.rb +1 -1
  101. data/pio.gemspec +2 -2
  102. data/spec/pio/flow_mod_spec.rb +45 -45
  103. data/spec/pio/match_spec.rb +122 -120
  104. data/spec/pio/{hello13_spec.rb → open_flow13/hello_spec.rb} +11 -11
  105. data/spec/pio/packet_out_spec.rb +19 -19
  106. data/spec/pio/set_ether_destination_address_spec.rb +28 -0
  107. data/spec/pio/set_ether_source_address_spec.rb +28 -0
  108. data/spec/pio/set_ip_destination_address_spec.rb +27 -0
  109. data/spec/pio/set_ip_source_address_spec.rb +25 -0
  110. data/spec/pio/set_transport_destination_port_spec.rb +44 -0
  111. data/spec/pio/set_transport_source_port_spec.rb +44 -0
  112. data/spec/pio/wildcards_spec.rb +23 -21
  113. metadata +179 -165
  114. data/bin/byebug +0 -16
  115. data/lib/pio/exact_match.rb +0 -51
  116. data/spec/pio/set_eth_dst_addr_spec.rb +0 -28
  117. data/spec/pio/set_eth_src_addr_spec.rb +0 -28
  118. data/spec/pio/set_ip_dst_addr_spec.rb +0 -25
  119. data/spec/pio/set_ip_src_addr_spec.rb +0 -25
  120. data/spec/pio/set_transport_dst_port_spec.rb +0 -42
  121. data/spec/pio/set_transport_src_port_spec.rb +0 -42
@@ -1,5 +1,5 @@
1
- Feature: Hello
2
- Scenario: create
1
+ Feature: Pio::Hello
2
+ Scenario: new
3
3
  When I try to create an OpenFlow message with:
4
4
  """
5
5
  Pio::Hello.new
@@ -15,7 +15,7 @@ Feature: Hello
15
15
  | xid | 0 |
16
16
  | body | |
17
17
 
18
- Scenario: create (transaction_id: 123)
18
+ Scenario: new(transaction_id: 123)
19
19
  When I try to create an OpenFlow message with:
20
20
  """
21
21
  Pio::Hello.new(transaction_id: 123)
@@ -31,7 +31,7 @@ Feature: Hello
31
31
  | xid | 123 |
32
32
  | body | |
33
33
 
34
- Scenario: create (xid: 123)
34
+ Scenario: new(xid: 123)
35
35
  When I try to create an OpenFlow message with:
36
36
  """
37
37
  Pio::Hello.new(xid: 123)
@@ -47,22 +47,22 @@ Feature: Hello
47
47
  | xid | 123 |
48
48
  | body | |
49
49
 
50
- Scenario: create (xid: -1) and error
50
+ Scenario: new(xid: -1) and error
51
51
  When I try to create an OpenFlow message with:
52
52
  """
53
53
  Pio::Hello.new(xid: -1)
54
54
  """
55
55
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
56
56
 
57
- Scenario: create (xid: 2**32) and error
57
+ Scenario: new(xid: 2**32) and error
58
58
  When I try to create an OpenFlow message with:
59
59
  """
60
60
  Pio::Hello.new(xid: 2**32)
61
61
  """
62
62
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
63
63
 
64
- Scenario: parse
65
- When I try to parse a file named "hello.raw" with "Hello" class
64
+ Scenario: read
65
+ When I try to parse a file named "open_flow10/hello.raw" with "Hello" class
66
66
  Then it should finish successfully
67
67
  And the message have the following fields and values:
68
68
  | field | value |
@@ -75,5 +75,5 @@ Feature: Hello
75
75
  | body | |
76
76
 
77
77
  Scenario: parse error
78
- When I try to parse a file named "features_request.raw" with "Pio::Hello" class
78
+ When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Hello" class
79
79
  Then it should fail with "Pio::ParseError", "Invalid Hello message."
File without changes
@@ -1,5 +1,5 @@
1
- Feature: Packet In
2
- Scenario: create
1
+ Feature: Pio::PacketIn
2
+ Scenario: new
3
3
  When I try to create an OpenFlow message with:
4
4
  """
5
5
  data_dump = [
@@ -36,8 +36,8 @@ Feature: Packet In
36
36
  | destination_mac | ff:ff:ff:ff:ff:ff |
37
37
  | destination_mac.class | Pio::Mac |
38
38
 
39
- Scenario: parse
40
- When I try to parse a file named "packet_in_arp_request.raw" with "PacketIn" class
39
+ Scenario: read
40
+ When I try to parse a file named "open_flow10/packet_in_arp_request.raw" with "PacketIn" class
41
41
  Then it should finish successfully
42
42
  And the message have the following fields and values:
43
43
  | field | value |
@@ -1,6 +1,6 @@
1
- Feature: Packet Out
2
- Scenario: parse
3
- When I try to parse a file named "packet_out.raw" with "PacketOut" class
1
+ Feature: Pio::PacketOut
2
+ Scenario: read
3
+ When I try to parse a file named "open_flow10/packet_out.raw" with "PacketOut" class
4
4
  Then it should finish successfully
5
5
  And the message have the following fields and values:
6
6
  | field | value |
File without changes
@@ -1,6 +1,6 @@
1
- Feature: Port Status
2
- Scenario: parse
3
- When I try to parse a file named "port_status.raw" with "PortStatus" class
1
+ Feature: Pio::PortStatus
2
+ Scenario: read
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
6
  | field | value |
File without changes
@@ -1,108 +1,111 @@
1
- Feature: Echo Reply
2
- Scenario: create
1
+ Feature: Pio::Echo::Reply
2
+ Background:
3
+ Given I use OpenFlow 1.3
4
+
5
+ Scenario: new
3
6
  When I try to create an OpenFlow message with:
4
7
  """
5
- Pio::Echo13::Reply.new
8
+ Pio::Echo::Reply.new
6
9
  """
7
10
  Then it should finish successfully
8
11
  And the message have the following fields and values:
9
- | field | value |
10
- | class | Pio::Echo13::Reply |
11
- | ofp_version | 4 |
12
- | message_type | 3 |
13
- | message_length | 8 |
14
- | transaction_id | 0 |
15
- | xid | 0 |
16
- | body | |
12
+ | field | value |
13
+ | class | Pio::Echo::Reply |
14
+ | ofp_version | 4 |
15
+ | message_type | 3 |
16
+ | message_length | 8 |
17
+ | transaction_id | 0 |
18
+ | xid | 0 |
19
+ | body | |
17
20
 
18
- Scenario: create (transaction_id: 123)
21
+ Scenario: new(transaction_id: 123)
19
22
  When I try to create an OpenFlow message with:
20
23
  """
21
- Pio::Echo13::Reply.new(transaction_id: 123)
24
+ Pio::Echo::Reply.new(transaction_id: 123)
22
25
  """
23
26
  Then it should finish successfully
24
27
  And the message have the following fields and values:
25
- | field | value |
26
- | class | Pio::Echo13::Reply |
27
- | ofp_version | 4 |
28
- | message_type | 3 |
29
- | message_length | 8 |
30
- | transaction_id | 123 |
31
- | xid | 123 |
32
- | body | |
28
+ | field | value |
29
+ | class | Pio::Echo::Reply |
30
+ | ofp_version | 4 |
31
+ | message_type | 3 |
32
+ | message_length | 8 |
33
+ | transaction_id | 123 |
34
+ | xid | 123 |
35
+ | body | |
33
36
 
34
- Scenario: create (xid: 123)
37
+ Scenario: new(xid: 123)
35
38
  When I try to create an OpenFlow message with:
36
39
  """
37
- Pio::Echo13::Reply.new(xid: 123)
40
+ Pio::Echo::Reply.new(xid: 123)
38
41
  """
39
42
  Then it should finish successfully
40
43
  And the message have the following fields and values:
41
- | field | value |
42
- | class | Pio::Echo13::Reply |
43
- | ofp_version | 4 |
44
- | message_type | 3 |
45
- | message_length | 8 |
46
- | transaction_id | 123 |
47
- | xid | 123 |
48
- | body | |
44
+ | field | value |
45
+ | class | Pio::Echo::Reply |
46
+ | ofp_version | 4 |
47
+ | message_type | 3 |
48
+ | message_length | 8 |
49
+ | transaction_id | 123 |
50
+ | xid | 123 |
51
+ | body | |
49
52
 
50
- Scenario: create (xid: -1) and error
53
+ Scenario: new(xid: -1) and error
51
54
  When I try to create an OpenFlow message with:
52
55
  """
53
- Pio::Echo13::Reply.new(xid: -1)
56
+ Pio::Echo::Reply.new(xid: -1)
54
57
  """
55
58
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
56
59
 
57
- Scenario: create (xid: 2**32) and error
60
+ Scenario: new(xid: 2**32) and error
58
61
  When I try to create an OpenFlow message with:
59
62
  """
60
- Pio::Echo13::Reply.new(xid: 2**32)
63
+ Pio::Echo::Reply.new(xid: 2**32)
61
64
  """
62
65
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
63
66
 
64
- Scenario: create (body: 'echo reply body')
67
+ Scenario: new(body: 'echo reply body')
65
68
  When I try to create an OpenFlow message with:
66
69
  """
67
- Pio::Echo13::Reply.new(body: 'echo reply body')
70
+ Pio::Echo::Reply.new(body: 'echo reply body')
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::Echo13::Reply |
73
- | ofp_version | 4 |
74
- | message_type | 3 |
75
- | message_length | 23 |
76
- | transaction_id | 0 |
77
- | xid | 0 |
78
- | body | echo reply body |
74
+ | field | value |
75
+ | class | Pio::Echo::Reply |
76
+ | ofp_version | 4 |
77
+ | message_type | 3 |
78
+ | message_length | 23 |
79
+ | transaction_id | 0 |
80
+ | xid | 0 |
81
+ | body | echo reply body |
79
82
 
80
- Scenario: create (unknown_attr: 'foo') and error
83
+ Scenario: new(unknown_attr: 'foo') and error
81
84
  When I try to create an OpenFlow message with:
82
85
  """
83
- Pio::Echo13::Reply.new(unknown_attr: 'foo')
86
+ Pio::Echo::Reply.new(unknown_attr: 'foo')
84
87
  """
85
88
  Then it should fail with "RuntimeError", "Unknown keyword: unknown_attr"
86
89
 
87
- Scenario: parse (no message body)
88
- When I try to parse a file named "echo13_reply_no_body.raw" with "Pio::Echo13::Reply" class
90
+ Scenario: read (no message body)
91
+ When I try to parse a file named "open_flow13/echo_reply_no_body.raw" with "Pio::Echo::Reply" class
89
92
  Then it should finish successfully
90
93
  And the message have the following fields and values:
91
- | field | value |
92
- | class | Pio::Echo13::Reply |
93
- | ofp_version | 4 |
94
- | message_type | 3 |
95
- | message_length | 8 |
96
- | transaction_id | 0 |
97
- | xid | 0 |
98
- | body | |
94
+ | field | value |
95
+ | class | Pio::Echo::Reply |
96
+ | ofp_version | 4 |
97
+ | message_type | 3 |
98
+ | message_length | 8 |
99
+ | transaction_id | 0 |
100
+ | xid | 0 |
101
+ | body | |
99
102
 
100
- Scenario: parse
101
- When I try to parse a file named "echo13_reply_body.raw" with "Pio::Echo13::Reply" class
103
+ Scenario: read
104
+ When I try to parse a file named "open_flow13/echo_reply_body.raw" with "Pio::Echo::Reply" class
102
105
  Then it should finish successfully
103
106
  And the message have the following fields and values:
104
107
  | field | value |
105
- | class | Pio::Echo13::Reply |
108
+ | class | Pio::Echo::Reply |
106
109
  | ofp_version | 4 |
107
110
  | message_type | 3 |
108
111
  | message_length | 28 |
@@ -111,5 +114,5 @@ Feature: Echo Reply
111
114
  | body | hogehogehogehogehoge |
112
115
 
113
116
  Scenario: parse error
114
- When I try to parse a file named "features_request.raw" with "Pio::Echo13::Reply" class
117
+ When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Echo::Reply" class
115
118
  Then it should fail with "Pio::ParseError", "Invalid Echo Reply 1.3 message."
@@ -1,108 +1,111 @@
1
- Feature: Echo Request
2
- Scenario: create
1
+ Feature: Pio::Echo::Request
2
+ Background:
3
+ Given I use OpenFlow 1.3
4
+
5
+ Scenario: new
3
6
  When I try to create an OpenFlow message with:
4
7
  """
5
- Pio::Echo13::Request.new
8
+ Pio::Echo::Request.new
6
9
  """
7
10
  Then it should finish successfully
8
11
  And the message have the following fields and values:
9
- | field | value |
10
- | class | Pio::Echo13::Request |
11
- | ofp_version | 4 |
12
- | message_type | 2 |
13
- | message_length | 8 |
14
- | transaction_id | 0 |
15
- | xid | 0 |
16
- | body | |
12
+ | field | value |
13
+ | class | Pio::Echo::Request |
14
+ | ofp_version | 4 |
15
+ | message_type | 2 |
16
+ | message_length | 8 |
17
+ | transaction_id | 0 |
18
+ | xid | 0 |
19
+ | body | |
17
20
 
18
- Scenario: create (transaction_id: 123)
21
+ Scenario: new(transaction_id: 123)
19
22
  When I try to create an OpenFlow message with:
20
23
  """
21
- Pio::Echo13::Request.new(transaction_id: 123)
24
+ Pio::Echo::Request.new(transaction_id: 123)
22
25
  """
23
26
  Then it should finish successfully
24
27
  And the message have the following fields and values:
25
- | field | value |
26
- | class | Pio::Echo13::Request |
27
- | ofp_version | 4 |
28
- | message_type | 2 |
29
- | message_length | 8 |
30
- | transaction_id | 123 |
31
- | xid | 123 |
32
- | body | |
28
+ | field | value |
29
+ | class | Pio::Echo::Request |
30
+ | ofp_version | 4 |
31
+ | message_type | 2 |
32
+ | message_length | 8 |
33
+ | transaction_id | 123 |
34
+ | xid | 123 |
35
+ | body | |
33
36
 
34
- Scenario: create (xid: 123)
37
+ Scenario: new(xid: 123)
35
38
  When I try to create an OpenFlow message with:
36
39
  """
37
- Pio::Echo13::Request.new(xid: 123)
40
+ Pio::Echo::Request.new(xid: 123)
38
41
  """
39
42
  Then it should finish successfully
40
43
  And the message have the following fields and values:
41
- | field | value |
42
- | class | Pio::Echo13::Request |
43
- | ofp_version | 4 |
44
- | message_type | 2 |
45
- | message_length | 8 |
46
- | transaction_id | 123 |
47
- | xid | 123 |
48
- | body | |
44
+ | field | value |
45
+ | class | Pio::Echo::Request |
46
+ | ofp_version | 4 |
47
+ | message_type | 2 |
48
+ | message_length | 8 |
49
+ | transaction_id | 123 |
50
+ | xid | 123 |
51
+ | body | |
49
52
 
50
- Scenario: create (xid: -1) and error
53
+ Scenario: new(xid: -1) and error
51
54
  When I try to create an OpenFlow message with:
52
55
  """
53
- Pio::Echo13::Request.new(xid: -1)
56
+ Pio::Echo::Request.new(xid: -1)
54
57
  """
55
58
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
56
59
 
57
- Scenario: create (xid: 2**32) and error
60
+ Scenario: new(xid: 2**32) and error
58
61
  When I try to create an OpenFlow message with:
59
62
  """
60
- Pio::Echo13::Request.new(xid: 2**32)
63
+ Pio::Echo::Request.new(xid: 2**32)
61
64
  """
62
65
  Then it should fail with "ArgumentError", "Transaction ID should be an unsigned 32-bit integer."
63
66
 
64
- Scenario: create (body: 'echo request body')
67
+ Scenario: new(body: 'echo request body')
65
68
  When I try to create an OpenFlow message with:
66
69
  """
67
- Pio::Echo13::Request.new(body: 'echo request body')
70
+ Pio::Echo::Request.new(body: 'echo request body')
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::Echo13::Request |
73
- | ofp_version | 4 |
74
- | message_type | 2 |
75
- | message_length | 25 |
76
- | transaction_id | 0 |
77
- | xid | 0 |
78
- | body | echo request body |
74
+ | field | value |
75
+ | class | Pio::Echo::Request |
76
+ | ofp_version | 4 |
77
+ | message_type | 2 |
78
+ | message_length | 25 |
79
+ | transaction_id | 0 |
80
+ | xid | 0 |
81
+ | body | echo request body |
79
82
 
80
- Scenario: create (unknown_attr: 'foo') and error
83
+ Scenario: new(unknown_attr: 'foo') and error
81
84
  When I try to create an OpenFlow message with:
82
85
  """
83
- Pio::Echo13::Request.new(unknown_attr: 'foo')
86
+ Pio::Echo::Request.new(unknown_attr: 'foo')
84
87
  """
85
88
  Then it should fail with "RuntimeError", "Unknown keyword: unknown_attr"
86
89
 
87
- Scenario: parse (no message body)
88
- When I try to parse a file named "echo13_request_no_body.raw" with "Pio::Echo13::Request" class
90
+ Scenario: read (no message body)
91
+ When I try to parse a file named "open_flow13/echo_request_no_body.raw" with "Pio::Echo::Request" class
89
92
  Then it should finish successfully
90
93
  And the message have the following fields and values:
91
- | field | value |
92
- | class | Pio::Echo13::Request |
93
- | ofp_version | 4 |
94
- | message_type | 2 |
95
- | message_length | 8 |
96
- | transaction_id | 0 |
97
- | xid | 0 |
98
- | body | |
94
+ | field | value |
95
+ | class | Pio::Echo::Request |
96
+ | ofp_version | 4 |
97
+ | message_type | 2 |
98
+ | message_length | 8 |
99
+ | transaction_id | 0 |
100
+ | xid | 0 |
101
+ | body | |
99
102
 
100
- Scenario: parse
101
- When I try to parse a file named "echo13_request_body.raw" with "Pio::Echo13::Request" class
103
+ Scenario: read
104
+ When I try to parse a file named "open_flow13/echo_request_body.raw" with "Pio::Echo::Request" class
102
105
  Then it should finish successfully
103
106
  And the message have the following fields and values:
104
107
  | field | value |
105
- | class | Pio::Echo13::Request |
108
+ | class | Pio::Echo::Request |
106
109
  | ofp_version | 4 |
107
110
  | message_type | 2 |
108
111
  | message_length | 28 |
@@ -111,5 +114,5 @@ Feature: Echo Request
111
114
  | body | hogehogehogehogehoge |
112
115
 
113
116
  Scenario: parse error
114
- When I try to parse a file named "features_request.raw" with "Pio::Echo13::Request" class
117
+ When I try to parse a file named "open_flow10/features_request.raw" with "Pio::Echo::Request" class
115
118
  Then it should fail with "Pio::ParseError", "Invalid Echo Request 1.3 message."