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 kernels
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * kernelId<~Integer>: id to limit results to
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Array>:
|
|
|
|
# TODO: docs
|
2011-03-01 11:34:29 -05:00
|
|
|
def avail_kernels(kernel_id=nil)
|
|
|
|
options = {}
|
|
|
|
if kernel_id
|
|
|
|
options.merge!(:kernelId => kernel_id)
|
|
|
|
end
|
2010-09-08 13:56:38 -04:00
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
|
|
|
:query => { :api_action => 'avail.kernels' }.merge!(options)
|
|
|
|
)
|
|
|
|
end
|
2011-06-16 19:28:54 -04:00
|
|
|
|
2010-09-08 13:56:38 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|