1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/google/requests/compute/list_zones.rb
Ferran Rodenas 3ebe34c280 [google|compute] Refactor Compute to use the new Shared module
Commit d801b27 introduced a new Shared module with logic to initialize
a google_client_api and to make requests.

This commit refactors Compute to use the new Shared module.
2014-07-30 12:19:50 -07:00

28 lines
661 B
Ruby

module Fog
module Compute
class Google
class Mock
def list_zones
zones = self.data[:zones].values
build_excon_response({
"kind" => "compute#zoneList",
"selfLink" => "https://www.googleapis.com/compute/#{api_version}/projects/#{@project}/zones",
"id" => "projects/#{@project}/zones",
"items" => zones
})
end
end
class Real
def list_zones
api_method = @compute.zones.list
parameters = {
'project' => @project
}
request(api_method, parameters)
end
end
end
end
end