Sha256: 5ff4e67cf7b8b8267fc231cf5e809e73021887926258e0a0194355db6371a1fb

Contents?: true

Size: 536 Bytes

Versions: 51

Compression:

Stored size: 536 Bytes

Contents

require 'fog/openstack/models/collection'

module Fog
  module Volume
    class OpenStack
      module VolumeTypes
        def all(options = {})
          response = service.list_volume_types(options)
          load_response(response, 'volume_types')
        end

        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
      end
    end
  end
end

Version data entries

51 entries across 49 versions & 4 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.10 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.1.30 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.1.29 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.9 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.1.28 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.8 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.7 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.6 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.5 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.4 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.3 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.2 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.3.0 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.2.4 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.2.3 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.2.2 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.2.1 lib/fog/volume/openstack/models/volume_types.rb
fog-openstack-0.2.0 lib/fog/volume/openstack/models/volume_types.rb
fog-zj-0.1.28 lib/fog/volume/openstack/models/volume_types.rb