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

fix describe_images

This commit is contained in:
Wesley Beary 2009-07-21 21:51:32 -07:00
parent cde760df9d
commit d1ba2b8d15
2 changed files with 22 additions and 3 deletions

View file

@ -23,6 +23,10 @@ module Fog
# * :image_state<~String> - State of the image
# * :image_type<~String> - Type of the image
# * :is_public<~Boolean> - Whether or not the image is public
# * :kernel_id<~String> - Kernel id associated with image, if any
# * :platform<~String> - Operating platform of the image
# * :productCodes<~Array> - Product codes for the image
# * :ramdisk_id<~String> - Ramdisk id associated with image, if any
def describe_images(options = {})
params = {}
if options[:image_id]

View file

@ -3,7 +3,6 @@ require File.dirname(__FILE__) + '/../../spec_helper'
describe 'EC2.describe_images' do
it "should return proper attributes with no params" do
pending
actual = ec2.describe_images
actual.body[:request_id].should be_a(String)
image = actual.body[:image_set].first
@ -14,9 +13,25 @@ describe 'EC2.describe_images' do
image[:image_state].should be_a(String)
image[:image_type].should be_a(String)
[false, true].should include(image[:is_public])
p actual
# image[:kernel_id].should be_a(String)
# image[:platform].should be_a(String)
# image[:ramdisk_id].should be_a(String)
end
it "should return proper attributes with params"
it "should return proper attributes with params" do
actual = ec2.describe_images(:image_id => 'ami-5ee70037')
actual.body[:request_id].should be_a(String)
image = actual.body[:image_set].first
image[:architecture].should be_a(String)
image[:image_id].should be_a(String)
image[:image_location].should be_a(String)
image[:image_owner_id].should be_a(String)
image[:image_state].should be_a(String)
image[:image_type].should be_a(String)
[false, true].should include(image[:is_public])
# image[:kernel_id].should be_a(String)
# image[:platform].should be_a(String)
# image[:ramdisk_id].should be_a(String)
end
end