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/opennebula/models/compute/servers.rb
2014-06-16 08:32:32 +02:00

26 lines
450 B
Ruby

require 'fog/core/collection'
require 'fog/opennebula/models/compute/server'
module Fog
module Compute
class OpenNebula
class Servers < Fog::Collection
model Fog::Compute::OpenNebula::Server
def all(filter={})
load(service.list_vms(filter))
end
def get(id)
data = service.list_vms({:id => id})
new data.first unless data.empty?
end
end
end
end
end