1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/virtual_box/models/compute/mediums.rb
2013-01-07 21:01:23 +00:00

32 lines
653 B
Ruby

require 'fog/core/collection'
require 'fog/virtual_box/models/compute/medium'
module Fog
module Compute
class VirtualBox
class Mediums < Fog::Collection
model Fog::Compute::VirtualBox::Medium
def all
data = []
data.concat(service.dvd_images)
data.concat(service.floppy_images)
data.concat(service.hard_disks)
data = data.map do |medium|
{:raw => medium}
end
load(data)
end
def get(medium_identity)
data = service.find_medium(medium_identity)
new(:raw => data)
end
end
end
end
end