Class: Fog::Rackspace::BlockStorage::Volumes
- Inherits:
-
Collection
- Object
- Collection
- Fog::Rackspace::BlockStorage::Volumes
- Defined in:
- lib/fog/rackspace/models/block_storage/volumes.rb
Instance Method Summary collapse
-
#all ⇒ Fog::Rackspace::BlockStorage::Volumes
Returns list of volumes.
-
#get(volume_id) ⇒ Fog::Rackspace::BlockStorage::Volume
Retrieves volume.
Instance Method Details
#all ⇒ Fog::Rackspace::BlockStorage::Volumes
Returns list of volumes
17 18 19 20 |
# File 'lib/fog/rackspace/models/block_storage/volumes.rb', line 17 def all data = service.list_volumes.body['volumes'] load(data) end |
#get(volume_id) ⇒ Fog::Rackspace::BlockStorage::Volume
Retrieves volume
30 31 32 33 34 35 |
# File 'lib/fog/rackspace/models/block_storage/volumes.rb', line 30 def get(volume_id) data = service.get_volume(volume_id).body['volume'] new(data) rescue Fog::Rackspace::BlockStorage::NotFound nil end |