Sha256: 80f0c48ba244cd6362a1d0fbd96697f2c9eb12661badd75a73a1647d1b05afe7
Contents?: true
Size: 840 Bytes
Versions: 14
Compression:
Stored size: 840 Bytes
Contents
module Fog module Compute class Vsphere class Real def vm_power_on(options = {}) raise ArgumentError, "instance_uuid is a required parameter" unless options.key? 'instance_uuid' search_filter = { :uuid => options['instance_uuid'], 'vmSearch' => true, 'instanceUuid' => true } vm_mob_ref = connection.searchIndex.FindAllByUuid(search_filter).first task = vm_mob_ref.PowerOnVM_Task task.wait_for_completion # 'success', 'running', 'queued', 'error' { 'task_state' => task.info.state } end end class Mock def vm_power_on(options = {}) raise ArgumentError, "instance_uuid is a required parameter" unless options.key? 'instance_uuid' { 'task_state' => 'success' } end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems