Sha256: ff262f60a1ca0f60ac5deb7adb3ea56ef8f256e855ff28fd36bf984f53555a49

Contents?: true

Size: 829 Bytes

Versions: 109

Compression:

Stored size: 829 Bytes

Contents

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

Version data entries

109 entries across 109 versions & 19 rubygems

Version Path
fog-maestrodev-1.20.0.20140305101839 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/linode/requests/compute/stackscript_list.rb
fog-1.20.0 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/linode/requests/compute/stackscript_list.rb
fog-1.19.0 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/linode/requests/compute/stackscript_list.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/linode/requests/compute/stackscript_list.rb