lib/fog/hp/requests/network/create_port.rb in fog-1.22.0 vs lib/fog/hp/requests/network/create_port.rb in fog-1.22.1

- old
+ new

@@ -1,9 +1,8 @@ module Fog module HP class Network - class Real # Create a new port # # ==== Parameters # * 'network_id'<~String>: - UUId of the network @@ -60,11 +59,11 @@ end class Mock def create_port(network_id, options = {}) response = Excon::Response.new - if list_networks.body['networks'].detect {|_| _['id'] == network_id} + if list_networks.body['networks'].find {|_| _['id'] == network_id} response.status = 201 data = { 'id' => Fog::HP::Mock.uuid.to_s, 'name' => options[:name] || "", 'network_id' => network_id, @@ -84,9 +83,8 @@ else raise Fog::HP::Network::NotFound end end end - end end end