class Fog::Cosmic::Compute::Volumes
Public Instance Methods
all(attributes = {})
click to toggle source
# File lib/fog/cosmic/models/compute/volumes.rb, line 10 def all(attributes = {}) response = service.list_volumes(attributes) data = response["listvolumesresponse"]["volume"] || [] load(data) end
get(volume_id)
click to toggle source
# File lib/fog/cosmic/models/compute/volumes.rb, line 16 def get(volume_id) if volume = service.list_volumes('id' => volume_id)["listvolumesresponse"]["volume"].first new(volume) end rescue Fog::Cosmic::Compute::BadRequest nil end