lib/fog/hp/requests/network/update_subnet.rb in fog-1.22.0 vs lib/fog/hp/requests/network/update_subnet.rb in fog-1.22.1
- old
+ new
@@ -1,9 +1,8 @@
module Fog
module HP
class Network
-
class Real
# Update an existing subnet
#
# ==== Parameters
# * 'id'<~String>: - UUId for the subnet
@@ -50,11 +49,11 @@
end
class Mock
def update_subnet(subnet_id, options = {})
response = Excon::Response.new
- if subnet = list_subnets.body['subnets'].detect {|_| _['id'] == subnet_id}
+ if subnet = list_subnets.body['subnets'].find {|_| _['id'] == subnet_id}
subnet['name'] = options[:name]
subnet['gateway_ip'] = options[:gateway_ip]
subnet['dns_nameservers'] = options[:dns_nameservers]
subnet['host_routes'] = options[:host_routes]
subnet['enable_dhcp'] = options[:enable_dhcp]
@@ -64,9 +63,8 @@
else
raise Fog::HP::Network::NotFound
end
end
end
-
end
end
end