Sha256: ff1df0b29e74c2fb0b506ab2972f395abb04dbb7efec79a579b85bd89c043672

Contents?: true

Size: 1.32 KB

Versions: 15

Compression:

Stored size: 1.32 KB

Contents

unless Fog.mocking?

  module Fog
    module Rackspace
      class Files

        # List existing storage containers
        #
        # ==== Parameters
        # * options<~Hash>:
        #   * 'limit'<~Integer> - Upper limit to number of results returned
        #   * 'marker'<~String> - Only return objects with name greater than this value
        #
        # ==== Returns
        # * response<~Fog::AWS::Response>:
        #   * body<~Array>:
        #     * container<~Hash>:
        #       * 'bytes'<~Integer>: - Number of bytes used by container
        #       * 'count'<~Integer>: - Number of items in container
        #       * 'name'<~String>: - Name of container
        def get_containers(options = {})
          options = { 'format' => 'json' }.merge!(options)
          query = []
          for key, value in options
            query << "#{key}=#{CGI.escape(value)}"
          end
          response = storage_request(
            :expects  => [200, 204],
            :method   => 'GET',
            :path     => '',
            :query    => query.join('&')
          )
          if response.status == 204
            response.body = []
          end
          response
        end

      end
    end
  end

else

  module Fog
    module Rackspace
      class Servers

        def get_flavors
        end

      end
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fog-0.0.29 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.28 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.27 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.26 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.25 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.24 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.23 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.22 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.21 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.20 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.19 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.18 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.17 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.16 lib/fog/rackspace/requests/files/get_containers.rb
fog-0.0.15 lib/fog/rackspace/requests/files/get_containers.rb