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

- old
+ new

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