mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace] add get_image_details
This commit is contained in:
parent
20edaa3097
commit
2cba552d1b
2 changed files with 36 additions and 0 deletions
35
lib/fog/rackspace/requests/servers/get_image_details.rb
Normal file
35
lib/fog/rackspace/requests/servers/get_image_details.rb
Normal file
|
@ -0,0 +1,35 @@
|
|||
module Fog
|
||||
module Rackspace
|
||||
module Servers
|
||||
class Real
|
||||
|
||||
# Get details for image by id
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~Hash>:
|
||||
# * 'id'<~Integer> - Id of the image
|
||||
# * 'name'<~String> - Name of the image
|
||||
# * 'serverId'<~Integer> - Id of server image was created from
|
||||
# * 'status'<~Integer> - Status of image
|
||||
# * 'updated'<~String> - Timestamp of last update
|
||||
def get_image_details(image_id)
|
||||
request(
|
||||
:expects => [200, 203],
|
||||
:method => 'GET',
|
||||
:path => "images/#{image_id}.json"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
|
||||
def get_image_details(image_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -15,6 +15,7 @@ module Fog
|
|||
require 'fog/rackspace/requests/servers/delete_image'
|
||||
require 'fog/rackspace/requests/servers/delete_server'
|
||||
require 'fog/rackspace/requests/servers/get_flavor_details'
|
||||
require 'fog/rackspace/requests/servers/get_image_details'
|
||||
require 'fog/rackspace/requests/servers/get_server_details'
|
||||
require 'fog/rackspace/requests/servers/list_addresses'
|
||||
require 'fog/rackspace/requests/servers/list_private_addresses'
|
||||
|
|
Loading…
Add table
Reference in a new issue