Sha256: 43130f4084f17e264aca47ee25b1b409438399495a8b7c0be3d56c5a7274ec7a

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 KB

Contents

module Fog
  module Rackspace
    class BlockStorage
      class Real

        # Retrieves list of volumes
        # @return [Excon::Response] response:
        #   * body [Hash]:
        #     * 'volumes' [Array]: -
        #       * 'volume_type' [String]: - volume type
        #       * 'display_description' [String]: - display desciption for volume
        #       * 'metadata' [Hash]: - metadata for volume
        #       * 'availability_zone' [String]: - region for volume
        #       * 'status' [String]: - status of volume
        #       * 'id' [String]: - id of volume
        #       * 'attachments' [Array]: - array of hashes containing attachment information
        #       * 'size' [Fixnum]: -  size of volume in GB (100 GB minimum)
        #       * 'snapshot_id' [String]: - optional snapshot from which to create a volume.
        #       * 'display_name' [String]: - display name of bolume
        #       * 'created_at' [String]: - volume creation time
        # @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
        # @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
        # @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
        # @raise [Fog::Rackspace::Errors::ServiceError]
        # @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumesSimple__v1__tenant_id__volumes.html
        def list_volumes
          request(
            :expects => [200],
            :method => 'GET',
            :path => 'volumes'
          )
        end
      end

      class Mock
        def list_volumes
          volumes = self.data[:volumes].values
          response(:body => {"volumes" => volumes})
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/rackspace/requests/block_storage/list_volumes.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.10.1 lib/fog/rackspace/requests/block_storage/list_volumes.rb