2010-09-08 13:56:38 -04:00
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class Linode
|
2010-09-08 13:56:38 -04:00
|
|
|
class Real
|
2011-05-24 18:02:59 -04:00
|
|
|
|
|
|
|
# Get available distributions
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * distributionId<~Integer>: id to limit results to
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Array>:
|
|
|
|
# TODO: docs
|
2010-09-08 13:56:38 -04:00
|
|
|
def avail_distributions(distribution_id=nil)
|
|
|
|
options = {}
|
|
|
|
if distribution_id
|
|
|
|
options.merge!(:distributionId => distribution_id)
|
|
|
|
end
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
|
|
|
:query => { :api_action => 'avail.distributions' }.merge!(options)
|
|
|
|
)
|
|
|
|
end
|
2011-06-16 19:28:54 -04:00
|
|
|
|
2010-09-08 13:56:38 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|