Sha256: e74b1fc3f4a89e27aedd9974a268e4d1ce192b2bd399642fb7af02d9ef46a49c

Contents?: true

Size: 1.7 KB

Versions: 55

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

55 entries across 55 versions & 3 rubygems

Version Path
fog-1.22.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.21.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.20.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-1.19.0 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/rackspace/requests/block_storage/list_volumes.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/rackspace/requests/block_storage/list_volumes.rb