Sha256: 017f1ec6101c55d1108316a47097a7a1e8f77a711ab6ff339a618d48dd69f010
Contents?: true
Size: 644 Bytes
Versions: 23
Compression:
Stored size: 644 Bytes
Contents
module Fog module Vsphere class Compute 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
23 entries across 23 versions & 1 rubygems