mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Added get_image function.
This commit is contained in:
parent
c66d55284c
commit
24b7ba1eab
3 changed files with 16 additions and 1 deletions
|
@ -9,6 +9,7 @@ module Fog
|
|||
recognizes :serverlove_api_url
|
||||
|
||||
request_path 'fog/serverlove/requests/compute'
|
||||
request :get_image
|
||||
request :get_images
|
||||
request :destroy_image
|
||||
request :create_image
|
||||
|
|
|
@ -15,7 +15,8 @@ module Fog
|
|||
end
|
||||
|
||||
def get(image_id)
|
||||
connection.get_image(image_id)
|
||||
data = connection.get_image(image_id).body
|
||||
new(data)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
13
lib/fog/serverlove/requests/compute/get_image.rb
Normal file
13
lib/fog/serverlove/requests/compute/get_image.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
module Fog
|
||||
module Compute
|
||||
class Serverlove
|
||||
class Real
|
||||
|
||||
def get_image(image_id)
|
||||
request(:method => "get", :path => "/drives/#{image_id}/info", :expects => 200)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue