Sha256: 01f69fa24bb0f12a029bfeddb1f9ddf83e0e6a866fbd0142c578840afd0c8e71
Contents?: true
Size: 700 Bytes
Versions: 23
Compression:
Stored size: 700 Bytes
Contents
module Fog module Vsphere class Compute class Real def vm_remove_snapshot(vm_id, snapshot_id, remove_children = false) vm = servers.get(vm_id) snapshot = vm.snapshots.get(snapshot_id).mo_ref task = snapshot.RemoveSnapshot_Task(removeChildren: remove_children) task.wait_for_completion { 'task_state' => task.info.state, 'was_cancelled' => task.info.cancelled } end end class Mock def vm_remove_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