1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[xenserver] Consoles collection created

This commit is contained in:
Gustavo Villalta 2013-07-30 14:20:48 -03:00
parent 58aba87c81
commit 96f9fae02d

View file

@ -0,0 +1,25 @@
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