mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
32 lines
829 B
Ruby
32 lines
829 B
Ruby
module Fog
|
|
module Compute
|
|
class Linode
|
|
class Real
|
|
|
|
# Get available stack scripts
|
|
#
|
|
# ==== Parameters
|
|
# * scriptId<~Integer>: id to limit results to
|
|
#
|
|
# ==== Returns
|
|
# * response<~Excon::Response>:
|
|
# * body<~Array>:
|
|
# TODO: docs
|
|
def stackscript_list(script_id=nil)
|
|
options = {}
|
|
if script_id
|
|
options.merge!(:stackScriptID => script_id)
|
|
end
|
|
result = request(
|
|
:expects => 200,
|
|
:method => 'GET',
|
|
:query => { :api_action => 'stackscript.list' }.merge!(options)
|
|
)
|
|
result.body['DATA'].each { |r| r['DISTRIBUTIONIDLIST'] = r['DISTRIBUTIONIDLIST'].to_s }
|
|
result
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|