lib/fog/hp/requests/network/delete_subnet.rb in fog-1.22.0 vs lib/fog/hp/requests/network/delete_subnet.rb in fog-1.22.1
- old
+ new
@@ -1,9 +1,8 @@
module Fog
module HP
class Network
-
class Real
# Delete an existing subnet
#
# ==== Parameters
# * subnet_id<~String> - UUId for the subnet to delete
@@ -17,18 +16,17 @@
end
class Mock
def delete_subnet(subnet_id)
response = Excon::Response.new
- if list_subnets.body['subnets'].detect {|_| _['id'] == subnet_id}
+ if list_subnets.body['subnets'].find {|_| _['id'] == subnet_id}
self.data[:subnets].delete(subnet_id)
response.status = 204
response
else
raise Fog::HP::Network::NotFound
end
end
end
-
end
end
end