1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[google] client.images doesn't list google public images

This commit is contained in:
Romain Vrignaud 2013-08-02 11:46:32 +02:00
parent 04062770a4
commit 9f2bd9b80b
2 changed files with 11 additions and 3 deletions

View file

@ -10,7 +10,14 @@ module Fog
model Fog::Compute::Google::Image
def all
data = connection.list_images.body["items"]
data = []
[ self.service.project,
'google',
'debian-cloud',
'centos-cloud',
].each do |project|
data += service.list_images(project).body["items"]
end
load(data)
end

View file

@ -12,10 +12,11 @@ module Fog
class Real
def list_images
def list_images(project=nil)
api_method = @compute.images.list
project=@project if project.nil?
parameters = {
'project' => @project
'project' => project
}
result = self.build_result(api_method, parameters)