Class: Fog::Vsphere::Compute::Tickets

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/vsphere/models/compute/tickets.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#serverObject

Returns the value of attribute server.



7
8
9
# File 'lib/fog/vsphere/models/compute/tickets.rb', line 7

def server
  @server
end

Instance Method Details

#create(opts = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/fog/vsphere/models/compute/tickets.rb', line 9

def create(opts = {})
  requires :server
  raise 'server must be a Fog::Vsphere::Compute::Server' unless server.is_a?(Fog::Vsphere::Compute::Server)
  new(
    service.vm_acquire_ticket(
      opts.merge(
        'instance_uuid' => server.instance_uuid
      )
    )
  )
end