2013-07-30 13:01:35 -04:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class XenServer
|
|
|
|
class Console < Fog::Model
|
|
|
|
# API Reference here:
|
2013-12-10 20:05:42 -05:00
|
|
|
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=console
|
2013-07-30 13:01:35 -04:00
|
|
|
|
|
|
|
identity :reference
|
2013-12-10 20:05:42 -05:00
|
|
|
|
2013-07-30 13:01:35 -04:00
|
|
|
attribute :location
|
2013-12-10 20:05:42 -05:00
|
|
|
attribute :other_config
|
2013-07-30 13:01:35 -04:00
|
|
|
attribute :protocol
|
|
|
|
attribute :uuid
|
|
|
|
attribute :__vm, aliases: :VM
|
|
|
|
|
|
|
|
def vm
|
|
|
|
begin
|
|
|
|
vm = service.servers.get __vm
|
|
|
|
rescue Fog::XenServer::RequestFailed => e
|
|
|
|
vm = nil
|
|
|
|
end
|
|
|
|
vm
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|