lib/fog/hp/requests/network/get_router.rb in fog-1.22.0 vs lib/fog/hp/requests/network/get_router.rb in fog-1.22.1
- old
+ new
@@ -1,9 +1,8 @@
module Fog
module HP
class Network
-
class Real
# Get details for an existing router by id
#
# ==== Parameters
# * 'router_id'<~String>: - UUId for the router to get details for
@@ -29,18 +28,17 @@
end
class Mock
def get_router(router_id)
response = Excon::Response.new
- if router = list_routers.body['routers'].detect {|_| _['id'] == router_id}
+ if router = list_routers.body['routers'].find {|_| _['id'] == router_id}
response.status = 200
response.body = { 'router' => router }
response
else
raise Fog::HP::Network::NotFound
end
end
end
-
end
end
end