Sha256: dffb9963bfb09028f0f528df43289148200df076c788690801c7a409064c2fac

Contents?: true

Size: 554 Bytes

Versions: 11

Compression:

Stored size: 554 Bytes

Contents

require 'fog/core/collection'
require 'fog/rackspace/models/block_storage/volume'

module Fog
  module Rackspace
    class BlockStorage
      class Volumes < Fog::Collection

        model Fog::Rackspace::BlockStorage::Volume

        def all
          data = connection.list_volumes.body['volumes']
          load(data)
        end

        def get(volume_id)
          data = connection.get_volume(volume_id).body['volume']
          new(data)
        rescue Fog::Rackspace::BlockStorage::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/rackspace/models/block_storage/volumes.rb
fog-nirvanix-1.8.1 lib/fog/rackspace/models/block_storage/volumes.rb
fog-parser-fix-1.6.1 lib/fog/rackspace/models/block_storage/volumes.rb
fog-test-again-1.6.0 lib/fog/rackspace/models/block_storage/volumes.rb
fog-parser-fix-1.6.0 lib/fog/rackspace/models/block_storage/volumes.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/rackspace/models/block_storage/volumes.rb
fog-sgonyea-1.8.1 lib/fog/rackspace/models/block_storage/volumes.rb
fog-1.8.0 lib/fog/rackspace/models/block_storage/volumes.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/rackspace/models/block_storage/volumes.rb
fog-1.7.0 lib/fog/rackspace/models/block_storage/volumes.rb
fog-1.6.0 lib/fog/rackspace/models/block_storage/volumes.rb