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:
parent
c8fbdbe16e
commit
4ffa8675ea
4 changed files with 28 additions and 1 deletions
|
@ -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')
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
21
lib/fog/ovirt/requests/compute/vm_ticket.rb
Normal file
21
lib/fog/ovirt/requests/compute/vm_ticket.rb
Normal 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
|
Loading…
Reference in a new issue