Class: Fog::Rackspace::BlockStorage::VolumeTypes

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/block_storage/volume_types.rb

Instance Method Summary collapse

Instance Method Details

#allFog::Rackspace::BlockStorage::VolumeTypes

Returns list of volume types



17
18
19
20
# File 'lib/fog/rackspace/models/block_storage/volume_types.rb', line 17

def all
  data = service.list_volume_types.body['volume_types']
  load(data)
end

#get(volume_type_id) ⇒ Fog::Rackspace::BlockStorage::VolumeType

Retrieves volume type

Parameters:

  • volume_type_id (String)

    for volume_type to be returned

Returns:

Raises:

See Also:



30
31
32
33
34
35
# File 'lib/fog/rackspace/models/block_storage/volume_types.rb', line 30

def get(volume_type_id)
  data = service.get_volume_type(volume_type_id).body['volume_type']
  new(data)
rescue Fog::Rackspace::BlockStorage::NotFound
  nil
end