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

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object


7
8
9
10
# File 'lib/fog/volume/openstack/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/volume/openstack/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::Volume::OpenStack::NotFound
  nil
end