Sha256: 2586053d34ec7bbf4571266e510ed944a5948b870f3b55d8d5ea8be261b19cd1
Contents?: true
Size: 676 Bytes
Versions: 57
Compression:
Stored size: 676 Bytes
Contents
require 'fog/core/collection' require 'fog/openstack/models/volume/volume_type' module Fog module Volume class OpenStack class VolumeTypes < Fog::Collection model Fog::Volume::OpenStack::VolumeType def all(options = {}) response = service.list_volume_types(options) load(response.body['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 alias_method :find_by_id, :get end end end end
Version data entries
57 entries across 57 versions & 5 rubygems