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:
parent
531574d89e
commit
d70dedb678
4 changed files with 55 additions and 3 deletions
|
@ -11,9 +11,6 @@ unless Fog.mocking?
|
|||
# * 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
|
||||
request(
|
||||
:expects => [200, 203],
|
||||
|
|
42
lib/fog/rackspace/requests/servers/list_images_detail.rb
Normal file
42
lib/fog/rackspace/requests/servers/list_images_detail.rb
Normal 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
|
|
@ -13,6 +13,7 @@ module Fog
|
|||
load "fog/rackspace/requests/servers/get_server_details.rb"
|
||||
load "fog/rackspace/requests/servers/list_flavors.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_detail.rb"
|
||||
load "fog/rackspace/requests/servers/reboot_server.rb"
|
||||
|
|
12
spec/rackspace/requests/servers/list_images_detail.rb
Normal file
12
spec/rackspace/requests/servers/list_images_detail.rb
Normal 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
|
Loading…
Reference in a new issue