Sha256: 81aa5589b361e3d7e9b2574e5d6a370d94ecfb3c342d3bf34160429fa406e5bb

Contents?: true

Size: 975 Bytes

Versions: 86

Compression:

Stored size: 975 Bytes

Contents

module Fog
  module Compute
    class Joyent

      class Mock
        def list_packages
          response = Excon::Response.new()
          response.status = 200
          response.body = self.data[:packages].values
          response
        end
      end

      class Real
        # Lists all the packages available to the authenticated user
        # ==== Returns
        # Exon::Response<Array>
        # * name<~String> The "friendly name for this package
        # * memory<~Number> How much memory will by available (in Mb)
        # * disk<~Number> How much disk space will be available (in Gb)
        # * swap<~Number> How much swap memory will be available (in Mb)
        # * default<~Boolean> Whether this is the default package in this datacenter"
        #
        def list_packages
          request(
            :path => "/my/packages",
            :method => "GET",
            :expects => 200
          )
        end
      end # Real

    end

  end
end

Version data entries

86 entries across 86 versions & 16 rubygems

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