pio 0.30.1 → 0.30.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -4
  3. data/Rakefile +6 -4
  4. data/features/step_definitions/Gemfile +2 -0
  5. data/features/step_definitions/Guardfile +2 -0
  6. data/features/step_definitions/Rakefile +2 -0
  7. data/features/step_definitions/dump_flows_steps.rb +2 -0
  8. data/features/step_definitions/open_flow_steps.rb +2 -0
  9. data/features/step_definitions/packet_data_steps.rb +3 -1
  10. data/features/step_definitions/rest_api_steps.rb +2 -0
  11. data/features/step_definitions/ruby_steps.rb +2 -0
  12. data/features/step_definitions/show_stats_steps.rb +2 -0
  13. data/features/step_definitions/trema_steps.rb +2 -0
  14. data/features/step_definitions/virtual_link_steps.rb +2 -0
  15. data/features/support/env.rb +1 -2
  16. data/features/support/hooks.rb +2 -0
  17. data/lib/pio.rb +2 -0
  18. data/lib/pio/arp.rb +2 -0
  19. data/lib/pio/arp/format.rb +2 -0
  20. data/lib/pio/arp/message.rb +2 -0
  21. data/lib/pio/arp/reply.rb +2 -0
  22. data/lib/pio/arp/request.rb +4 -2
  23. data/lib/pio/class_inspector.rb +2 -0
  24. data/lib/pio/dhcp.rb +2 -0
  25. data/lib/pio/dhcp/ack.rb +2 -0
  26. data/lib/pio/dhcp/boot_reply.rb +2 -0
  27. data/lib/pio/dhcp/boot_reply_options.rb +2 -0
  28. data/lib/pio/dhcp/boot_request.rb +2 -0
  29. data/lib/pio/dhcp/boot_request_options.rb +2 -0
  30. data/lib/pio/dhcp/client_id.rb +2 -0
  31. data/lib/pio/dhcp/common_options.rb +2 -0
  32. data/lib/pio/dhcp/dhcp_field.rb +2 -0
  33. data/lib/pio/dhcp/dhcp_tlv_options.rb +30 -20
  34. data/lib/pio/dhcp/discover.rb +2 -0
  35. data/lib/pio/dhcp/field_util.rb +3 -1
  36. data/lib/pio/dhcp/frame.rb +2 -0
  37. data/lib/pio/dhcp/message.rb +2 -0
  38. data/lib/pio/dhcp/offer.rb +2 -0
  39. data/lib/pio/dhcp/optional_tlv.rb +3 -1
  40. data/lib/pio/dhcp/parameter_list.rb +2 -0
  41. data/lib/pio/dhcp/request.rb +2 -0
  42. data/lib/pio/ethernet_frame.rb +2 -0
  43. data/lib/pio/ethernet_header.rb +2 -0
  44. data/lib/pio/icmp.rb +2 -0
  45. data/lib/pio/icmp/format.rb +2 -0
  46. data/lib/pio/icmp/message.rb +2 -0
  47. data/lib/pio/icmp/reply.rb +2 -0
  48. data/lib/pio/icmp/request.rb +2 -0
  49. data/lib/pio/instance_inspector.rb +2 -0
  50. data/lib/pio/ipv4_address.rb +2 -0
  51. data/lib/pio/ipv4_header.rb +2 -0
  52. data/lib/pio/lldp.rb +2 -0
  53. data/lib/pio/lldp/chassis_id_tlv.rb +2 -0
  54. data/lib/pio/lldp/end_of_lldpdu_value.rb +2 -0
  55. data/lib/pio/lldp/frame.rb +2 -0
  56. data/lib/pio/lldp/management_address_value.rb +2 -0
  57. data/lib/pio/lldp/optional_tlv.rb +2 -0
  58. data/lib/pio/lldp/options.rb +4 -2
  59. data/lib/pio/lldp/organizationally_specific_value.rb +2 -0
  60. data/lib/pio/lldp/port_description_value.rb +2 -0
  61. data/lib/pio/lldp/port_id_tlv.rb +2 -0
  62. data/lib/pio/lldp/system_capabilities_value.rb +2 -0
  63. data/lib/pio/lldp/system_description_value.rb +2 -0
  64. data/lib/pio/lldp/system_name_value.rb +2 -0
  65. data/lib/pio/lldp/ttl_tlv.rb +2 -0
  66. data/lib/pio/mac.rb +2 -0
  67. data/lib/pio/message.rb +2 -0
  68. data/lib/pio/message_type_selector.rb +2 -0
  69. data/lib/pio/monkey_patch/bindata_record.rb +2 -0
  70. data/lib/pio/monkey_patch/bindata_string.rb +2 -0
  71. data/lib/pio/monkey_patch/integer.rb +2 -0
  72. data/lib/pio/monkey_patch/integer/base_conversions.rb +2 -0
  73. data/lib/pio/monkey_patch/integer/ranges.rb +2 -0
  74. data/lib/pio/monkey_patch/uint.rb +2 -0
  75. data/lib/pio/monkey_patch/uint/base_conversions.rb +2 -0
  76. data/lib/pio/open_flow.rb +2 -0
  77. data/lib/pio/open_flow/action.rb +2 -0
  78. data/lib/pio/open_flow/buffer_id.rb +2 -0
  79. data/lib/pio/open_flow/datapath_id.rb +2 -0
  80. data/lib/pio/open_flow/error_message.rb +2 -0
  81. data/lib/pio/open_flow/flags.rb +2 -0
  82. data/lib/pio/open_flow/flow_match.rb +2 -0
  83. data/lib/pio/open_flow/header.rb +2 -0
  84. data/lib/pio/open_flow/hello_failed_code.rb +2 -0
  85. data/lib/pio/open_flow/instruction.rb +2 -0
  86. data/lib/pio/open_flow/message.rb +2 -0
  87. data/lib/pio/open_flow/nicira_action.rb +2 -0
  88. data/lib/pio/open_flow/nicira_resubmit.rb +2 -0
  89. data/lib/pio/open_flow/nicira_resubmit_table.rb +2 -0
  90. data/lib/pio/open_flow/parser.rb +2 -0
  91. data/lib/pio/open_flow/port.rb +2 -0
  92. data/lib/pio/open_flow/transaction_id.rb +2 -0
  93. data/lib/pio/open_flow/version.rb +2 -0
  94. data/lib/pio/open_flow10.rb +2 -0
  95. data/lib/pio/open_flow10/actions.rb +2 -0
  96. data/lib/pio/open_flow10/aggregate_stats/reply.rb +2 -0
  97. data/lib/pio/open_flow10/aggregate_stats/request.rb +2 -0
  98. data/lib/pio/open_flow10/barrier/reply.rb +2 -0
  99. data/lib/pio/open_flow10/barrier/request.rb +2 -0
  100. data/lib/pio/open_flow10/description_stats/reply.rb +2 -0
  101. data/lib/pio/open_flow10/description_stats/request.rb +2 -0
  102. data/lib/pio/open_flow10/echo/reply.rb +2 -0
  103. data/lib/pio/open_flow10/echo/request.rb +2 -0
  104. data/lib/pio/open_flow10/enqueue.rb +2 -0
  105. data/lib/pio/open_flow10/error.rb +2 -0
  106. data/lib/pio/open_flow10/error/bad_request.rb +2 -0
  107. data/lib/pio/open_flow10/error/bad_request/bad_request_code.rb +2 -0
  108. data/lib/pio/open_flow10/error/error_type10.rb +2 -0
  109. data/lib/pio/open_flow10/error/hello_failed.rb +2 -0
  110. data/lib/pio/open_flow10/exact_match.rb +2 -0
  111. data/lib/pio/open_flow10/features.rb +2 -0
  112. data/lib/pio/open_flow10/features/reply.rb +22 -20
  113. data/lib/pio/open_flow10/features/request.rb +2 -0
  114. data/lib/pio/open_flow10/flow_mod.rb +5 -3
  115. data/lib/pio/open_flow10/flow_mod/command.rb +2 -0
  116. data/lib/pio/open_flow10/flow_removed.rb +2 -0
  117. data/lib/pio/open_flow10/flow_removed/reason.rb +2 -0
  118. data/lib/pio/open_flow10/flow_stats/reply.rb +2 -0
  119. data/lib/pio/open_flow10/flow_stats/request.rb +2 -0
  120. data/lib/pio/open_flow10/hello.rb +2 -0
  121. data/lib/pio/open_flow10/match.rb +4 -2
  122. data/lib/pio/open_flow10/match10.rb +2 -0
  123. data/lib/pio/open_flow10/packet_in.rb +2 -0
  124. data/lib/pio/open_flow10/packet_in/reason.rb +2 -0
  125. data/lib/pio/open_flow10/packet_out.rb +2 -0
  126. data/lib/pio/open_flow10/phy_port16.rb +21 -19
  127. data/lib/pio/open_flow10/port16.rb +2 -0
  128. data/lib/pio/open_flow10/port_stats/request.rb +2 -0
  129. data/lib/pio/open_flow10/port_status.rb +2 -0
  130. data/lib/pio/open_flow10/port_status/reason.rb +2 -0
  131. data/lib/pio/open_flow10/queue_stats/request.rb +2 -0
  132. data/lib/pio/open_flow10/send_out_port.rb +2 -0
  133. data/lib/pio/open_flow10/set_destination_ip_address.rb +2 -0
  134. data/lib/pio/open_flow10/set_destination_mac_address.rb +2 -0
  135. data/lib/pio/open_flow10/set_source_ip_address.rb +2 -0
  136. data/lib/pio/open_flow10/set_source_mac_address.rb +2 -0
  137. data/lib/pio/open_flow10/set_tos.rb +2 -0
  138. data/lib/pio/open_flow10/set_transport_port.rb +2 -0
  139. data/lib/pio/open_flow10/set_vlan_priority.rb +2 -0
  140. data/lib/pio/open_flow10/set_vlan_vid.rb +2 -0
  141. data/lib/pio/open_flow10/stats_reply.rb +2 -0
  142. data/lib/pio/open_flow10/stats_request.rb +2 -0
  143. data/lib/pio/open_flow10/stats_type.rb +2 -0
  144. data/lib/pio/open_flow10/strip_vlan_header.rb +2 -0
  145. data/lib/pio/open_flow10/table_stats/request.rb +2 -0
  146. data/lib/pio/open_flow10/vendor_action.rb +2 -0
  147. data/lib/pio/open_flow13.rb +2 -0
  148. data/lib/pio/open_flow13/actions.rb +2 -0
  149. data/lib/pio/open_flow13/apply.rb +2 -0
  150. data/lib/pio/open_flow13/copy_ttl_inwards.rb +2 -0
  151. data/lib/pio/open_flow13/copy_ttl_outwards.rb +2 -0
  152. data/lib/pio/open_flow13/decrement_ip_ttl.rb +2 -0
  153. data/lib/pio/open_flow13/echo/reply.rb +2 -0
  154. data/lib/pio/open_flow13/echo/request.rb +2 -0
  155. data/lib/pio/open_flow13/error.rb +2 -0
  156. data/lib/pio/open_flow13/error/bad_request.rb +2 -0
  157. data/lib/pio/open_flow13/error/error_type13.rb +2 -0
  158. data/lib/pio/open_flow13/error/hello_failed.rb +2 -0
  159. data/lib/pio/open_flow13/features/reply.rb +11 -9
  160. data/lib/pio/open_flow13/features/request.rb +2 -0
  161. data/lib/pio/open_flow13/flow_mod.rb +7 -5
  162. data/lib/pio/open_flow13/goto_table.rb +2 -0
  163. data/lib/pio/open_flow13/hello.rb +2 -0
  164. data/lib/pio/open_flow13/match.rb +17 -15
  165. data/lib/pio/open_flow13/meter.rb +2 -0
  166. data/lib/pio/open_flow13/nicira_conjunction.rb +2 -0
  167. data/lib/pio/open_flow13/nicira_reg_load.rb +2 -0
  168. data/lib/pio/open_flow13/nicira_reg_move.rb +5 -3
  169. data/lib/pio/open_flow13/nicira_send_out_port.rb +2 -0
  170. data/lib/pio/open_flow13/nicira_stack_pop.rb +2 -0
  171. data/lib/pio/open_flow13/nicira_stack_push.rb +2 -0
  172. data/lib/pio/open_flow13/packet_in.rb +2 -0
  173. data/lib/pio/open_flow13/packet_out.rb +2 -0
  174. data/lib/pio/open_flow13/port32.rb +2 -0
  175. data/lib/pio/open_flow13/send_out_port.rb +2 -0
  176. data/lib/pio/open_flow13/set_arp_operation.rb +2 -0
  177. data/lib/pio/open_flow13/set_arp_sender_hardware_address.rb +2 -0
  178. data/lib/pio/open_flow13/set_arp_sender_protocol_address.rb +2 -0
  179. data/lib/pio/open_flow13/set_destination_mac_address.rb +2 -0
  180. data/lib/pio/open_flow13/set_ip_ttl.rb +2 -0
  181. data/lib/pio/open_flow13/set_metadata.rb +2 -0
  182. data/lib/pio/open_flow13/set_source_mac_address.rb +2 -0
  183. data/lib/pio/open_flow13/stats_request.rb +9 -7
  184. data/lib/pio/open_flow13/write_metadata.rb +2 -0
  185. data/lib/pio/options.rb +2 -0
  186. data/lib/pio/parse_error.rb +2 -0
  187. data/lib/pio/parser.rb +2 -0
  188. data/lib/pio/payload.rb +2 -0
  189. data/lib/pio/pcap.rb +2 -0
  190. data/lib/pio/ruby_dumper.rb +2 -0
  191. data/lib/pio/type/ether_type.rb +2 -0
  192. data/lib/pio/type/ip_address.rb +2 -0
  193. data/lib/pio/type/ipv6_address.rb +2 -0
  194. data/lib/pio/type/mac_address.rb +2 -0
  195. data/lib/pio/udp.rb +2 -0
  196. data/lib/pio/udp_header.rb +2 -0
  197. data/lib/pio/version.rb +3 -1
  198. data/pio.gemspec +7 -5
  199. data/spec/pio/arp/reply_spec.rb +2 -0
  200. data/spec/pio/arp/request_spec.rb +2 -0
  201. data/spec/pio/arp_spec.rb +2 -0
  202. data/spec/pio/dhcp/ack_spec.rb +2 -0
  203. data/spec/pio/dhcp/discover_spec.rb +2 -0
  204. data/spec/pio/dhcp/offer_spec.rb +2 -0
  205. data/spec/pio/dhcp/request_spec.rb +2 -0
  206. data/spec/pio/dhcp_spec.rb +2 -0
  207. data/spec/pio/icmp/reply_spec.rb +2 -0
  208. data/spec/pio/icmp/request_spec.rb +2 -0
  209. data/spec/pio/icmp_spec.rb +2 -0
  210. data/spec/pio/ipv4_address_spec.rb +2 -0
  211. data/spec/pio/lldp/options_spec.rb +2 -0
  212. data/spec/pio/mac_spec.rb +2 -0
  213. data/spec/pio/monkey_patch/integer_spec.rb +2 -0
  214. data/spec/pio/open_flow/nicira_resubmit_spec.rb +2 -0
  215. data/spec/pio/open_flow/nicira_resubmit_table_spec.rb +2 -0
  216. data/spec/pio/open_flow10/echo/reply_spec.rb +2 -0
  217. data/spec/pio/open_flow10/echo/request_spec.rb +2 -0
  218. data/spec/pio/open_flow10/enqueue_spec.rb +2 -0
  219. data/spec/pio/open_flow10/error/hello_failed_spec.rb +2 -0
  220. data/spec/pio/open_flow10/features/reply_spec.rb +2 -0
  221. data/spec/pio/open_flow10/features/request_spec.rb +2 -0
  222. data/spec/pio/open_flow10/flow_mod_spec.rb +29 -27
  223. data/spec/pio/open_flow10/flow_stats_reply_spec.rb +2 -0
  224. data/spec/pio/open_flow10/flow_stats_request_spec.rb +7 -5
  225. data/spec/pio/open_flow10/hello_spec.rb +2 -0
  226. data/spec/pio/open_flow10/match_spec.rb +68 -66
  227. data/spec/pio/open_flow10/packet_in_spec.rb +2 -0
  228. data/spec/pio/open_flow10/packet_out_spec.rb +2 -0
  229. data/spec/pio/open_flow10/phy_port16_spec.rb +4 -2
  230. data/spec/pio/open_flow10/send_out_port_spec.rb +2 -0
  231. data/spec/pio/open_flow10/set_destination_ip_address_spec.rb +2 -0
  232. data/spec/pio/open_flow10/set_destination_mac_address_spec.rb +2 -0
  233. data/spec/pio/open_flow10/set_source_ip_address_spec.rb +2 -0
  234. data/spec/pio/open_flow10/set_source_mac_address_spec.rb +2 -0
  235. data/spec/pio/open_flow10/set_tos_spec.rb +2 -0
  236. data/spec/pio/open_flow10/set_transport_destination_port_spec.rb +2 -0
  237. data/spec/pio/open_flow10/set_transport_source_port_spec.rb +2 -0
  238. data/spec/pio/open_flow10/set_vlan_priority_spec.rb +2 -0
  239. data/spec/pio/open_flow10/set_vlan_vid_spec.rb +2 -0
  240. data/spec/pio/open_flow10/strip_vlan_header_spec.rb +2 -0
  241. data/spec/pio/open_flow10/wildcards_spec.rb +2 -0
  242. data/spec/pio/open_flow13/echo_reply_spec.rb +2 -0
  243. data/spec/pio/open_flow13/echo_request_spec.rb +2 -0
  244. data/spec/pio/open_flow13/error/bad_request_spec.rb +2 -0
  245. data/spec/pio/open_flow13/error/hello_failed_spec.rb +2 -0
  246. data/spec/pio/open_flow13/features/reply_spec.rb +2 -0
  247. data/spec/pio/open_flow13/features/request_spec.rb +2 -0
  248. data/spec/pio/open_flow13/goto_table_spec.rb +2 -0
  249. data/spec/pio/open_flow13/hello_spec.rb +3 -1
  250. data/spec/pio/open_flow13/match_spec.rb +2 -0
  251. data/spec/pio/open_flow13/meter_spec.rb +2 -0
  252. data/spec/pio/open_flow13/nicira_reg_load_spec.rb +2 -0
  253. data/spec/pio/open_flow13/nicira_reg_move_spec.rb +2 -0
  254. data/spec/pio/open_flow13/nicira_send_out_port_spec.rb +2 -0
  255. data/spec/pio/open_flow13/packet_in_spec.rb +2 -0
  256. data/spec/pio/open_flow13/packet_out_spec.rb +2 -0
  257. data/spec/pio/open_flow13/write_metadata_spec.rb +2 -0
  258. data/spec/pio/open_flow_spec.rb +2 -0
  259. data/spec/spec_helper.rb +1 -12
  260. data/spec/support/shared_examples_for_openflow_messages.rb +2 -0
  261. metadata +134 -135
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/packet_in'
2
4
 
3
5
  describe Pio::OpenFlow10::PacketIn do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/packet_out'
2
4
 
3
5
  describe Pio::OpenFlow10::PacketOut do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio'
2
4
 
3
5
  describe Pio::OpenFlow10::PhyPort16 do
@@ -8,7 +10,7 @@ describe Pio::OpenFlow10::PhyPort16 do
8
10
  name: 'port123',
9
11
  config: [:port_down],
10
12
  state: [:link_down],
11
- curr: [:port_10gb_fd, :port_copper])
13
+ curr: %i[port_10gb_fd port_copper])
12
14
  end
13
15
 
14
16
  Then { phy_port.number == 1 }
@@ -16,7 +18,7 @@ describe Pio::OpenFlow10::PhyPort16 do
16
18
  Then { phy_port.name == 'port123' }
17
19
  Then { phy_port.config == [:port_down] }
18
20
  Then { phy_port.state == [:link_down] }
19
- Then { phy_port.curr == [:port_10gb_fd, :port_copper] }
21
+ Then { phy_port.curr == %i[port_10gb_fd port_copper] }
20
22
  Then { phy_port.advertised.empty? }
21
23
  Then { phy_port.supported.empty? }
22
24
  Then { phy_port.peer.empty? }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/send_out_port'
2
4
 
3
5
  describe Pio::OpenFlow10::SendOutPort do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_destination_ip_address'
2
4
 
3
5
  describe Pio::OpenFlow10::SetDestinationIpAddress do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_destination_mac_address'
2
4
 
3
5
  describe Pio::OpenFlow10::SetDestinationMacAddress do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_source_ip_address'
2
4
 
3
5
  describe Pio::OpenFlow10::SetSourceIpAddress do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_source_mac_address'
2
4
 
3
5
  describe Pio::OpenFlow10::SetSourceMacAddress do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_tos'
2
4
 
3
5
  describe Pio::OpenFlow10::SetTos do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_transport_port'
2
4
 
3
5
  describe Pio::OpenFlow10::SetTransportDestinationPort do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_transport_port'
2
4
 
3
5
  describe Pio::OpenFlow10::SetTransportSourcePort do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_vlan_priority'
2
4
 
3
5
  describe Pio::OpenFlow10::SetVlanPriority do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/set_vlan_vid'
2
4
 
3
5
  describe Pio::OpenFlow10::SetVlanVid do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow10/strip_vlan_header'
2
4
 
3
5
  describe Pio::OpenFlow10::StripVlanHeader do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bindata'
2
4
  require 'pio/open_flow10/match'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/echo/reply'
2
4
 
3
5
  describe Pio::OpenFlow13::Echo::Reply do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/echo/request'
2
4
 
3
5
  describe Pio::OpenFlow13::Echo::Request do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/error/bad_request'
2
4
 
3
5
  describe Pio::OpenFlow13::Error::BadRequest do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/error/hello_failed'
2
4
 
3
5
  describe Pio::OpenFlow13::Error::HelloFailed do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/features/reply'
2
4
 
3
5
  describe Pio::OpenFlow13::Features::Reply do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/features/request'
2
4
 
3
5
  describe Pio::OpenFlow13::Features::Request do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/goto_table'
2
4
 
3
5
  describe Pio::OpenFlow13::GotoTable do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/hello'
2
4
  require 'pio/parse_error'
3
5
 
@@ -28,7 +30,7 @@ describe Pio::OpenFlow13::Hello do
28
30
  Then { result.length == 16 }
29
31
  Then { result.transaction_id.zero? }
30
32
  Then { result.xid.zero? }
31
- Then { result.supported_versions == [:open_flow10, :open_flow13] }
33
+ Then { result.supported_versions == %i[open_flow10 open_flow13] }
32
34
  end
33
35
 
34
36
  context 'with a hello message (OpenFlow 1.0)' do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/match'
2
4
 
3
5
  # rubocop:disable LineLength
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/meter'
2
4
 
3
5
  describe Pio::OpenFlow13::Meter do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/nicira_reg_load'
2
4
 
3
5
  describe Pio::OpenFlow13::NiciraRegLoad do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/nicira_reg_move'
2
4
 
3
5
  describe Pio::OpenFlow13::NiciraRegMove do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/nicira_send_out_port'
2
4
 
3
5
  describe Pio::OpenFlow13::NiciraSendOutPort do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/packet_in'
2
4
 
3
5
  describe Pio::OpenFlow13::PacketIn do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/packet_out'
2
4
 
3
5
  describe Pio::OpenFlow13::PacketOut do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow13/write_metadata'
2
4
 
3
5
  describe Pio::OpenFlow13::WriteMetadata do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pio/open_flow'
2
4
 
3
5
  describe Pio::OpenFlow do
@@ -1,15 +1,4 @@
1
- require 'simplecov'
2
- require 'codeclimate-test-reporter'
3
- require 'coveralls'
4
-
5
- formatters = [SimpleCov::Formatter::HTMLFormatter]
6
- formatters << Coveralls::SimpleCov::Formatter if ENV['COVERALLS_REPO_TOKEN']
7
- if ENV['CODECLIMATE_REPO_TOKEN']
8
- formatters << CodeClimate::TestReporter::Formatter
9
- end
10
-
11
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters)
12
- SimpleCov.start { add_filter '/vendor/' }
1
+ # frozen_string_literal: true
13
2
 
14
3
  require 'rspec/given'
15
4
  Dir['./spec/support/**/*.rb'].sort.each { |f| require f }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  shared_examples 'an OpenFlow message' do |klass|
2
4
  describe '.new' do
3
5
  When(:message) { klass.new(options) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.1
4
+ version: 0.30.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhito Takamiya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-26 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bindata
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 5.0.2
33
+ version: 5.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 5.0.2
40
+ version: 5.1.0
41
41
  description: Pure ruby packet parser and generator.
42
42
  email:
43
43
  - yasuhito@gmail.com
@@ -410,7 +410,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
410
410
  requirements:
411
411
  - - ">="
412
412
  - !ruby/object:Gem::Version
413
- version: 2.2.2
413
+ version: 2.3.0
414
414
  required_rubygems_version: !ruby/object:Gem::Requirement
415
415
  requirements:
416
416
  - - ">="
@@ -418,172 +418,171 @@ required_rubygems_version: !ruby/object:Gem::Requirement
418
418
  version: '0'
419
419
  requirements: []
420
420
  rubyforge_project:
421
- rubygems_version: 2.6.11
421
+ rubygems_version: 2.5.2
422
422
  signing_key:
423
423
  specification_version: 4
424
424
  summary: Packet parser and generator.
425
425
  test_files:
426
- - spec/pio/icmp/request_spec.rb
427
- - spec/pio/icmp/reply_spec.rb
426
+ - spec/pio/arp/reply_spec.rb
427
+ - spec/pio/arp/request_spec.rb
428
428
  - spec/pio/arp_spec.rb
429
- - spec/pio/open_flow_spec.rb
430
- - spec/pio/open_flow13/error/bad_request_spec.rb
431
- - spec/pio/open_flow13/error/hello_failed_spec.rb
432
- - spec/pio/open_flow13/match_spec.rb
433
- - spec/pio/open_flow13/packet_out_spec.rb
434
- - spec/pio/open_flow13/write_metadata_spec.rb
435
- - spec/pio/open_flow13/echo_reply_spec.rb
436
- - spec/pio/open_flow13/packet_in_spec.rb
437
- - spec/pio/open_flow13/nicira_reg_load_spec.rb
438
- - spec/pio/open_flow13/nicira_reg_move_spec.rb
439
- - spec/pio/open_flow13/meter_spec.rb
440
- - spec/pio/open_flow13/features/request_spec.rb
441
- - spec/pio/open_flow13/features/reply_spec.rb
442
- - spec/pio/open_flow13/nicira_send_out_port_spec.rb
443
- - spec/pio/open_flow13/echo_request_spec.rb
444
- - spec/pio/open_flow13/hello_spec.rb
445
- - spec/pio/open_flow13/goto_table_spec.rb
446
- - spec/pio/open_flow/nicira_resubmit_spec.rb
447
- - spec/pio/open_flow/nicira_resubmit_table_spec.rb
448
- - spec/pio/lldp/options_spec.rb
449
- - spec/pio/dhcp/request_spec.rb
450
- - spec/pio/dhcp/discover_spec.rb
451
429
  - spec/pio/dhcp/ack_spec.rb
430
+ - spec/pio/dhcp/discover_spec.rb
452
431
  - spec/pio/dhcp/offer_spec.rb
432
+ - spec/pio/dhcp/request_spec.rb
433
+ - spec/pio/dhcp_spec.rb
434
+ - spec/pio/icmp/reply_spec.rb
435
+ - spec/pio/icmp/request_spec.rb
436
+ - spec/pio/icmp_spec.rb
437
+ - spec/pio/ipv4_address_spec.rb
438
+ - spec/pio/lldp/options_spec.rb
439
+ - spec/pio/mac_spec.rb
440
+ - spec/pio/monkey_patch/integer_spec.rb
441
+ - spec/pio/open_flow/nicira_resubmit_spec.rb
442
+ - spec/pio/open_flow/nicira_resubmit_table_spec.rb
443
+ - spec/pio/open_flow10/echo/reply_spec.rb
444
+ - spec/pio/open_flow10/echo/request_spec.rb
445
+ - spec/pio/open_flow10/enqueue_spec.rb
453
446
  - spec/pio/open_flow10/error/hello_failed_spec.rb
454
- - spec/pio/open_flow10/match_spec.rb
455
- - spec/pio/open_flow10/set_destination_mac_address_spec.rb
456
- - spec/pio/open_flow10/set_transport_destination_port_spec.rb
457
- - spec/pio/open_flow10/packet_out_spec.rb
447
+ - spec/pio/open_flow10/features/reply_spec.rb
448
+ - spec/pio/open_flow10/features/request_spec.rb
449
+ - spec/pio/open_flow10/flow_mod_spec.rb
458
450
  - spec/pio/open_flow10/flow_stats_reply_spec.rb
459
- - spec/pio/open_flow10/packet_in_spec.rb
460
- - spec/pio/open_flow10/enqueue_spec.rb
461
- - spec/pio/open_flow10/set_source_mac_address_spec.rb
462
451
  - spec/pio/open_flow10/flow_stats_request_spec.rb
463
- - spec/pio/open_flow10/set_transport_source_port_spec.rb
464
- - spec/pio/open_flow10/echo/request_spec.rb
465
- - spec/pio/open_flow10/echo/reply_spec.rb
452
+ - spec/pio/open_flow10/hello_spec.rb
453
+ - spec/pio/open_flow10/match_spec.rb
454
+ - spec/pio/open_flow10/packet_in_spec.rb
455
+ - spec/pio/open_flow10/packet_out_spec.rb
466
456
  - spec/pio/open_flow10/phy_port16_spec.rb
467
- - spec/pio/open_flow10/features/request_spec.rb
468
- - spec/pio/open_flow10/features/reply_spec.rb
469
- - spec/pio/open_flow10/set_vlan_priority_spec.rb
470
- - spec/pio/open_flow10/wildcards_spec.rb
471
- - spec/pio/open_flow10/flow_mod_spec.rb
472
457
  - spec/pio/open_flow10/send_out_port_spec.rb
473
- - spec/pio/open_flow10/set_vlan_vid_spec.rb
474
458
  - spec/pio/open_flow10/set_destination_ip_address_spec.rb
459
+ - spec/pio/open_flow10/set_destination_mac_address_spec.rb
475
460
  - spec/pio/open_flow10/set_source_ip_address_spec.rb
461
+ - spec/pio/open_flow10/set_source_mac_address_spec.rb
476
462
  - spec/pio/open_flow10/set_tos_spec.rb
477
- - spec/pio/open_flow10/hello_spec.rb
463
+ - spec/pio/open_flow10/set_transport_destination_port_spec.rb
464
+ - spec/pio/open_flow10/set_transport_source_port_spec.rb
465
+ - spec/pio/open_flow10/set_vlan_priority_spec.rb
466
+ - spec/pio/open_flow10/set_vlan_vid_spec.rb
478
467
  - spec/pio/open_flow10/strip_vlan_header_spec.rb
479
- - spec/pio/arp/request_spec.rb
480
- - spec/pio/arp/reply_spec.rb
481
- - spec/pio/icmp_spec.rb
482
- - spec/pio/mac_spec.rb
483
- - spec/pio/monkey_patch/integer_spec.rb
484
- - spec/pio/dhcp_spec.rb
485
- - spec/pio/ipv4_address_spec.rb
486
- - spec/support/shared_examples_for_openflow_messages.rb
468
+ - spec/pio/open_flow10/wildcards_spec.rb
469
+ - spec/pio/open_flow13/echo_reply_spec.rb
470
+ - spec/pio/open_flow13/echo_request_spec.rb
471
+ - spec/pio/open_flow13/error/bad_request_spec.rb
472
+ - spec/pio/open_flow13/error/hello_failed_spec.rb
473
+ - spec/pio/open_flow13/features/reply_spec.rb
474
+ - spec/pio/open_flow13/features/request_spec.rb
475
+ - spec/pio/open_flow13/goto_table_spec.rb
476
+ - spec/pio/open_flow13/hello_spec.rb
477
+ - spec/pio/open_flow13/match_spec.rb
478
+ - spec/pio/open_flow13/meter_spec.rb
479
+ - spec/pio/open_flow13/nicira_reg_load_spec.rb
480
+ - spec/pio/open_flow13/nicira_reg_move_spec.rb
481
+ - spec/pio/open_flow13/nicira_send_out_port_spec.rb
482
+ - spec/pio/open_flow13/packet_in_spec.rb
483
+ - spec/pio/open_flow13/packet_out_spec.rb
484
+ - spec/pio/open_flow13/write_metadata_spec.rb
485
+ - spec/pio/open_flow_spec.rb
487
486
  - spec/spec_helper.rb
488
- - features/icmp/icmp_request.feature
487
+ - spec/support/shared_examples_for_openflow_messages.rb
488
+ - features/arp/arp.feature
489
+ - features/arp/arp_reply.feature
490
+ - features/arp/arp_request.feature
491
+ - features/dhcp.feature
492
+ - features/ethernet_header.feature
489
493
  - features/icmp/icmp.feature
490
494
  - features/icmp/icmp_reply.feature
491
- - features/dhcp.feature
492
- - features/open_flow_version.feature
495
+ - features/icmp/icmp_request.feature
493
496
  - features/ipv4_header.feature
494
- - features/open_flow13/packet_out.feature
495
- - features/open_flow13/packet_in.feature
496
- - features/open_flow13/echo_request.feature
497
- - features/open_flow13/apply_actions.feature
498
- - features/open_flow13/match.feature
499
- - features/open_flow13/echo_reply.feature
500
- - features/open_flow13/set_ip_ttl.feature
501
- - features/open_flow13/goto_table.feature
502
- - features/open_flow13/stats_request.feature
503
- - features/open_flow13/flow_mod.feature
504
- - features/open_flow13/nicira_reg_load.feature
505
- - features/open_flow13/nicira_reg_move.feature
506
- - features/open_flow13/set_arp_operation.feature
507
- - features/open_flow13/send_out_port.feature
508
- - features/open_flow13/hello_failed.feature
509
- - features/open_flow13/copy_ttl_outwards.feature
510
- - features/open_flow13/features_request.feature
511
- - features/open_flow13/set_destination_mac_address.feature
512
- - features/open_flow13/nicira_stack_push.feature
513
- - features/open_flow13/set_source_mac_address.feature
514
- - features/open_flow13/write_metadata.feature
515
- - features/open_flow13/features_reply.feature
516
- - features/open_flow13/nicira_conjunction.feature
517
- - features/open_flow13/set_arp_sender_hardware_address.feature
518
- - features/open_flow13/nicira_send_out_port.feature
519
- - features/open_flow13/nicira_stack_pop.feature
520
- - features/open_flow13/decrement_ip_ttl.feature
521
- - features/open_flow13/set_arp_sender_protocol_address.feature
522
- - features/open_flow13/bad_request.feature
523
- - features/open_flow13/set_metadata.feature
524
- - features/open_flow13/copy_ttl_inwards.feature
525
- - features/open_flow13/hello.feature
526
- - features/open_flow13/meter.feature
527
- - features/open_flow/nicira_resubmit_table.feature
497
+ - features/lldp.feature
528
498
  - features/open_flow/header.feature
529
499
  - features/open_flow/nicira_resubmit.feature
530
- - features/open_flow10/packet_out.feature
500
+ - features/open_flow/nicira_resubmit_table.feature
531
501
  - features/open_flow10/aggregate_stats_reply.feature
532
- - features/open_flow10/packet_in.feature
533
- - features/open_flow10/table_stats_request.feature
502
+ - features/open_flow10/aggregate_stats_request.feature
503
+ - features/open_flow10/bad_request.feature
504
+ - features/open_flow10/barrier_reply.feature
505
+ - features/open_flow10/barrier_request.feature
506
+ - features/open_flow10/description_stats_reply.feature
507
+ - features/open_flow10/description_stats_request.feature
508
+ - features/open_flow10/echo_reply.feature
534
509
  - features/open_flow10/echo_request.feature
535
510
  - features/open_flow10/enqueue.feature
536
- - features/open_flow10/set_ip_destination_address.feature
537
- - features/open_flow10/set_vlan_vid.feature
538
- - features/open_flow10/echo_reply.feature
539
- - features/open_flow10/queue_stats_request.feature
540
- - features/open_flow10/flow_stats_reply.feature
541
- - features/open_flow10/flow_mod.feature
542
511
  - features/open_flow10/exact_match.feature
543
- - features/open_flow10/set_transport_source_port.feature
544
- - features/open_flow10/set_source_ip_address.feature
545
- - features/open_flow10/vendor_action.feature
546
- - features/open_flow10/send_out_port.feature
547
- - features/open_flow10/hello_failed.feature
512
+ - features/open_flow10/features_reply.feature
548
513
  - features/open_flow10/features_request.feature
514
+ - features/open_flow10/flow_mod.feature
515
+ - features/open_flow10/flow_removed.feature
516
+ - features/open_flow10/flow_stats_reply.feature
517
+ - features/open_flow10/flow_stats_request.feature
518
+ - features/open_flow10/hello.feature
519
+ - features/open_flow10/hello_failed.feature
520
+ - features/open_flow10/packet_in.feature
521
+ - features/open_flow10/packet_out.feature
522
+ - features/open_flow10/port_stats_request.feature
523
+ - features/open_flow10/port_status.feature
524
+ - features/open_flow10/queue_stats_request.feature
525
+ - features/open_flow10/send_out_port.feature
549
526
  - features/open_flow10/set_destination_mac_address.feature
550
- - features/open_flow10/description_stats_reply.feature
527
+ - features/open_flow10/set_ip_destination_address.feature
528
+ - features/open_flow10/set_source_ip_address.feature
551
529
  - features/open_flow10/set_source_mac_address.feature
530
+ - features/open_flow10/set_tos.feature
531
+ - features/open_flow10/set_transport_destination_port.feature
532
+ - features/open_flow10/set_transport_source_port.feature
552
533
  - features/open_flow10/set_vlan_priority.feature
553
- - features/open_flow10/port_stats_request.feature
534
+ - features/open_flow10/set_vlan_vid.feature
554
535
  - features/open_flow10/strip_vlan_header.feature
555
- - features/open_flow10/description_stats_request.feature
556
- - features/open_flow10/features_reply.feature
557
- - features/open_flow10/flow_stats_request.feature
558
- - features/open_flow10/set_transport_destination_port.feature
559
- - features/open_flow10/set_tos.feature
560
- - features/open_flow10/port_status.feature
561
- - features/open_flow10/flow_removed.feature
562
- - features/open_flow10/aggregate_stats_request.feature
563
- - features/open_flow10/barrier_request.feature
564
- - features/open_flow10/bad_request.feature
565
- - features/open_flow10/barrier_reply.feature
566
- - features/open_flow10/hello.feature
567
- - features/arp/arp_request.feature
568
- - features/arp/arp_reply.feature
569
- - features/arp/arp.feature
570
- - features/parser.feature
536
+ - features/open_flow10/table_stats_request.feature
537
+ - features/open_flow10/vendor_action.feature
538
+ - features/open_flow13/apply_actions.feature
539
+ - features/open_flow13/bad_request.feature
540
+ - features/open_flow13/copy_ttl_inwards.feature
541
+ - features/open_flow13/copy_ttl_outwards.feature
542
+ - features/open_flow13/decrement_ip_ttl.feature
543
+ - features/open_flow13/echo_reply.feature
544
+ - features/open_flow13/echo_request.feature
545
+ - features/open_flow13/features_reply.feature
546
+ - features/open_flow13/features_request.feature
547
+ - features/open_flow13/flow_mod.feature
548
+ - features/open_flow13/goto_table.feature
549
+ - features/open_flow13/hello.feature
550
+ - features/open_flow13/hello_failed.feature
551
+ - features/open_flow13/match.feature
552
+ - features/open_flow13/meter.feature
553
+ - features/open_flow13/nicira_conjunction.feature
554
+ - features/open_flow13/nicira_reg_load.feature
555
+ - features/open_flow13/nicira_reg_move.feature
556
+ - features/open_flow13/nicira_send_out_port.feature
557
+ - features/open_flow13/nicira_stack_pop.feature
558
+ - features/open_flow13/nicira_stack_push.feature
559
+ - features/open_flow13/packet_in.feature
560
+ - features/open_flow13/packet_out.feature
561
+ - features/open_flow13/send_out_port.feature
562
+ - features/open_flow13/set_arp_operation.feature
563
+ - features/open_flow13/set_arp_sender_hardware_address.feature
564
+ - features/open_flow13/set_arp_sender_protocol_address.feature
565
+ - features/open_flow13/set_destination_mac_address.feature
566
+ - features/open_flow13/set_ip_ttl.feature
567
+ - features/open_flow13/set_metadata.feature
568
+ - features/open_flow13/set_source_mac_address.feature
569
+ - features/open_flow13/stats_request.feature
570
+ - features/open_flow13/write_metadata.feature
571
571
  - features/open_flow_read.feature
572
- - features/step_definitions/open_flow_steps.rb
573
- - features/step_definitions/Guardfile
572
+ - features/open_flow_version.feature
573
+ - features/parser.feature
574
574
  - features/step_definitions/dump_flows_steps.rb
575
- - features/step_definitions/show_stats_steps.rb
576
- - features/step_definitions/trema_steps.rb
577
- - features/step_definitions/ruby_steps.rb
578
575
  - features/step_definitions/Gemfile
579
- - features/step_definitions/rest_api_steps.rb
580
- - features/step_definitions/Rakefile
581
- - features/step_definitions/virtual_link_steps.rb
576
+ - features/step_definitions/Guardfile
577
+ - features/step_definitions/open_flow_steps.rb
582
578
  - features/step_definitions/packet_data_steps.rb
579
+ - features/step_definitions/Rakefile
583
580
  - features/step_definitions/README.md
584
- - features/ethernet_header.feature
585
- - features/lldp.feature
581
+ - features/step_definitions/rest_api_steps.rb
582
+ - features/step_definitions/ruby_steps.rb
583
+ - features/step_definitions/show_stats_steps.rb
584
+ - features/step_definitions/trema_steps.rb
585
+ - features/step_definitions/virtual_link_steps.rb
586
586
  - features/support/env.rb
587
587
  - features/support/hooks.rb
588
588
  - features/udp.feature
589
- has_rdoc: