Sha256: 3c76f65431c504e9148bb8a3e265eb8cadefe29af0638940a6dbc3f4c4c9fcad

Contents?: true

Size: 1.02 KB

Versions: 23

Compression:

Stored size: 1.02 KB

Contents

module Fog
  module Vsphere
    class Compute
      class Real
        def vm_acquire_ticket(options = {})
          raise ArgumentError, 'instance_uuid is a required parameter' unless options.key?('instance_uuid')
          ticket_type = options['ticket_type'] || 'webmks'

          vm_mob_ref = get_vm_ref(options['instance_uuid'])

          ticket = vm_mob_ref.AcquireTicket(ticketType: ticket_type)
          {
            'ticket' => ticket.ticket,
            'host' => ticket.host,
            'port' => ticket.port,
            'ssl_thumbprint' => ticket.sslThumbprint
          }
        end
      end

      class Mock
        def vm_acquire_ticket(options = {})
          raise ArgumentError, 'instance_uuid is a required parameter' unless options.key?('instance_uuid')
          {
            'ticket' => 'fdsfdsf',
            'host' => 'esxi.example.com',
            'port' => 443,
            'ssl_thumbprint' => '1C:63:E1:BD:56:03:EB:44:85:12:12:FC:DA:40:11:65:0E:30:A1:B8'
          }
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
fog-vsphere-3.7.0 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.8 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.7 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.6 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.5 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.4 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.3 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.2 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.5.3 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.6.0 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.5.2 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.5.1 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.5.0 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.4.0 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.3.1 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.3.0 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.2.5 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.2.2 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.2.1 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb
fog-vsphere-3.2.0 lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb