2010-09-08 15:00:47 -07:00
|
|
|
module Fog
|
2011-06-16 16:28:54 -07:00
|
|
|
module Compute
|
|
|
|
class Slicehost
|
2010-09-08 15:00:47 -07:00
|
|
|
class Real
|
|
|
|
|
2011-01-07 16:52:09 -08:00
|
|
|
require 'fog/compute/parsers/slicehost/get_flavor'
|
2010-09-08 15:00:47 -07:00
|
|
|
|
|
|
|
# Get details of a flavor
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * flavor_id<~Integer> - Id of flavor to lookup
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Array>:
|
|
|
|
# * 'id'<~Integer> - Id of the flavor
|
|
|
|
# * 'name'<~String> - Name of the flavor
|
|
|
|
# * 'price'<~Integer> - Price in cents
|
|
|
|
# * 'ram'<~Integer> - Amount of ram for the flavor
|
|
|
|
def get_flavor(flavor_id)
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
2011-06-16 16:28:54 -07:00
|
|
|
:parser => Fog::Parsers::Compute::Slicehost::GetFlavor.new,
|
2010-09-08 15:00:47 -07:00
|
|
|
:path => "flavors/#{flavor_id}.xml"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|