Sha256: 936d1cd776a5c9211685e6634e4927429694edd996e61a0da88d76cbafe6466a
Contents?: true
Size: 621 Bytes
Versions: 13
Compression:
Stored size: 621 Bytes
Contents
require 'fog/core/collection' require 'fog/cloudstack/models/compute/volume' module Fog module Compute class Cloudstack class Volumes < Fog::Collection model Fog::Compute::Cloudstack::Volume def all data = connection.list_volumes["listvolumesresponse"]["volume"] || [] load(data) end def get(volume_id) if volume = connection.list_volumes('id' => volume_id)["listvolumesresponse"]["volume"].first new(volume) end rescue Fog::Compute::Cloudstack::BadRequest nil end end end end end
Version data entries
13 entries across 13 versions & 7 rubygems