Module: Fog::OpenStack::Volume::VolumeTypes

Included in:
Fog::OpenStack::Volume::V1::VolumeTypes, Fog::OpenStack::Volume::V2::VolumeTypes, Fog::OpenStack::Volume::V3::VolumeTypes
Defined in:
lib/fog/openstack/volume/models/volume_types.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



7
8
9
10
# File 'lib/fog/openstack/volume/models/volume_types.rb', line 7

def all(options = {})
  response = service.list_volume_types(options)
  load_response(response, 'volume_types')
end

#get(volume_type_id) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/fog/openstack/volume/models/volume_types.rb', line 12

def get(volume_type_id)
  if volume_type = service.get_volume_type_details(volume_type_id).body['volume_type']
    new(volume_type)
  end
rescue Fog::OpenStack::Volume::NotFound
  nil
end