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

ovirt added support for 'set vm ticket'.

This api call is needed for openning a console to the server.
This commit is contained in:
Amos Benari 2012-03-21 16:00:57 +02:00
parent c8fbdbe16e
commit 4ffa8675ea
4 changed files with 28 additions and 1 deletions

View file

@ -54,7 +54,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('rdoc')
s.add_development_dependency('thor')
s.add_development_dependency('rspec', '~>1.3.1')
s.add_development_dependency('rbovirt', '>=0.0.8')
s.add_development_dependency('rbovirt', '>=0.0.9')
s.add_development_dependency('shindo', '~>0.3.4')
s.add_development_dependency('virtualbox', '~>0.9.1')
s.add_development_dependency('fission')

View file

@ -36,6 +36,7 @@ module Fog
request :list_vm_interfaces
request :list_template_interfaces
request :list_networks
request :vm_ticket
module Shared
# converts an OVIRT object into an hash for fog to consume.

View file

@ -92,6 +92,11 @@ module Fog
connection.destroy_vm(:id => id)
end
def ticket(options = {})
raise "Can not set console ticket, Server is not ready. Server status: #{status}" unless ready?
connection.vm_ticket(id, options)
end
def save
if identity
connection.update_vm(attributes)

View file

@ -0,0 +1,21 @@
module Fog
module Compute
class Ovirt
class Real
def vm_ticket(id, options = {})
client.set_ticket(id, options)
end
end
class Mock
def vm_ticket(id, options = {})
"Secret"
end
end
end
end
end