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/xenserver/models/compute/consoles.rb
2013-07-30 14:20:48 -03:00

25 lines
546 B
Ruby

require 'fog/core/collection'
require 'fog/xenserver/models/compute/console'
module Fog
module Compute
class XenServer
class Consoles < Fog::Collection
model Fog::Compute::XenServer::Console
def all(options={})
data = service.get_records 'console'
load(data)
end
def get( console_ref )
if console_ref && console = service.get_record( console_ref, 'console' )
new(console)
else
nil
end
end
end
end
end
end