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

add list_images_detail

This commit is contained in:
Wesley Beary 2009-10-19 17:57:47 -07:00
parent 531574d89e
commit d70dedb678
4 changed files with 55 additions and 3 deletions

View file

@ -11,9 +11,6 @@ unless Fog.mocking?
# * body<~Hash>: # * body<~Hash>:
# * 'id'<~Integer> - Id of the image # * 'id'<~Integer> - Id of the image
# * 'name'<~String> - Name of the image # * 'name'<~String> - Name of the image
# * 'updated'<~String> - Last update timestamp for image
# * 'created'<~String> - Creation timestamp for image
# * 'status'<~String> - Status of image
def list_images def list_images
request( request(
:expects => [200, 203], :expects => [200, 203],

View file

@ -0,0 +1,42 @@
unless Fog.mocking?
module Fog
module Rackspace
class Servers
# List all images
#
# ==== Returns
# * response<~Fog::AWS::Response>:
# * body<~Hash>:
# * 'id'<~Integer> - Id of the image
# * 'name'<~String> - Name of the image
# * 'updated'<~String> - Last update timestamp for image
# * 'created'<~String> - Creation timestamp for image
# * 'status'<~String> - Status of image
def list_images_detail
request(
:expects => [200, 203],
:method => 'GET',
:path => 'images.json'
)
end
end
end
end
else
module Fog
module Rackspace
class Servers
def list_images
end
end
end
end
end

View file

@ -13,6 +13,7 @@ module Fog
load "fog/rackspace/requests/servers/get_server_details.rb" load "fog/rackspace/requests/servers/get_server_details.rb"
load "fog/rackspace/requests/servers/list_flavors.rb" load "fog/rackspace/requests/servers/list_flavors.rb"
load "fog/rackspace/requests/servers/list_images.rb" load "fog/rackspace/requests/servers/list_images.rb"
load "fog/rackspace/requests/servers/list_images_detail.rb"
load "fog/rackspace/requests/servers/list_servers.rb" load "fog/rackspace/requests/servers/list_servers.rb"
load "fog/rackspace/requests/servers/list_servers_detail.rb" load "fog/rackspace/requests/servers/list_servers_detail.rb"
load "fog/rackspace/requests/servers/reboot_server.rb" load "fog/rackspace/requests/servers/reboot_server.rb"

View file

@ -0,0 +1,12 @@
require File.dirname(__FILE__) + '/../../../spec_helper'
describe 'Rackspace::Servers.list_images_detail' do
describe 'success' do
it "should return proper attributes" do
pending
p servers.list_images_detail
end
end
end