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
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/joyent/requests/compute/list_packages.rb
fog-1.3.1 lib/fog/joyent/requests/compute/list_packages.rb
fog-1.3.0 lib/fog/joyent/requests/compute/list_packages.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/joyent/requests/compute/list_packages.rb
fog-1.2.0 lib/fog/joyent/requests/compute/list_packages.rb
ktheory-fog-1.1.2 lib/fog/joyent/requests/compute/list_packages.rb