1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/rackspace/requests/servers/get_flavor_details.rb

43 lines
894 B
Ruby
Raw Normal View History

2009-11-15 22:58:26 -05:00
unless Fog.mocking?
module Fog
module Rackspace
class Servers
# Get details for flavor by id
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'id'<~Integer> - Id of the flavor
# * 'name'<~String> - Name of the flavor
# * 'ram'<~Integer> - Amount of ram for the flavor
# * 'disk'<~Integer> - Amount of diskspace for the flavor
def get_flavor_details(flavor_id)
request(
:expects => [200, 203],
:method => 'GET',
:path => "flavors/#{flavor_id}.json"
)
end
end
end
end
else
module Fog
module Rackspace
class Servers
def get_flavor_details(flavor_id)
raise MockNotImplemented.new("Contributions welcome!")
2009-11-15 22:58:26 -05:00
end
end
end
end
end