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

Merge pull request #1624 from rubiojr/openstack-compute-images-fixes

[openstack|compute] images collection should not return nil for #all
This commit is contained in:
Wesley Beary 2013-03-04 09:59:36 -08:00
commit de442fc7aa
2 changed files with 16 additions and 1 deletions

View file

@ -13,10 +13,11 @@ module Fog
def all
data = service.list_images_detail.body['images']
load(data)
images = load(data)
if server
self.replace(self.select {|image| image.server_id == server.id})
end
images
end
def get(image_id)

View file

@ -0,0 +1,14 @@
Shindo.tests("Fog::Compute[:openstack] | images collection", ['openstack']) do
tests('success') do
tests('#all').succeeds do
fog = Fog::Compute[:openstack]
test 'not nil' do
fog.images.all.is_a? Array
end
end
end
end