Sha256: abbb9a391cf9ef363affcb4225bfeb098d02b25c0f630df8bda1e924e165129b
Contents?: true
Size: 642 Bytes
Versions: 11
Compression:
Stored size: 642 Bytes
Contents
module Fog module Compute class Vsphere class Real def vm_revert_snapshot(vm_id, snapshot_id) vm = servers.get(vm_id) snapshot = vm.snapshots.get(snapshot_id).mo_ref task = snapshot.RevertToSnapshot_Task task.wait_for_completion { 'task_state' => task.info.state, 'was_cancelled' => task.info.cancelled } end end class Mock def vm_revert_snapshot(vm_id, snapshot_id) { 'task_state' => 'success', 'was_cancelled' => false } end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems