Sha256: ac388ab4f41cfa8ae0777a749fb206e75c98f3ea06979bbc4b7033df6904132b

Contents?: true

Size: 1.7 KB

Versions: 39

Compression:

Stored size: 1.7 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::BlockStorage::NotFound] - HTTP 404
        # @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400
        # @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500
        # @raise [Fog::Rackspace::BlockStorage::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

39 entries across 37 versions & 6 rubygems

Version Path
fog-rackspace-0.1.6 lib/fog/rackspace/requests/block_storage/list_volumes.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-rackspace-0.1.5/lib/fog/rackspace/requests/block_storage/list_volumes.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-rackspace-0.1.5/lib/fog/rackspace/requests/block_storage/list_volumes.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-rackspace-0.1.5/lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-rackspace-0.1.5 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-rackspace-0.1.4 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-rackspace-0.1.3 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-rackspace-0.1.2 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-rackspace-0.1.1 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-rackspace-0.1.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.37.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.36.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.35.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-2.0.0.pre.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.34.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.33.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.32.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.31.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/rackspace/requests/block_storage/list_volumes.rb