Sha256: e15c1febc6ed3fe16c5b02eea8b4fbfc524d971f6757a1d4a321222880495b2b
Contents?: true
Size: 1.15 KB
Versions: 45
Compression:
Stored size: 1.15 KB
Contents
module Fog module Compute class Vsphere class Real def vm_take_snapshot(options = {}) raise ArgumentError, "instance_uuid is a required parameter" unless options.key? 'instance_uuid' raise ArgumentError, "name is a required parameter" unless options.key? 'name' vm = get_vm_ref(options['instance_uuid']) task = vm.CreateSnapshot_Task( :name => options['name'], :description => options['description'] || '', :memory => options['memory'] || true, :quiesce => options['quiesce'] || false ) task.wait_for_completion { 'task_state' => task.info.state, 'was_cancelled' => task.info.cancelled } end end class Mock def vm_take_snapshot(options = {}) raise ArgumentError, "instance_uuid is a required parameter" unless options.key? 'instance_uuid' raise ArgumentError, "name is a required parameter" unless options.key? 'name' { 'task_state' => 'success', 'was_cancelled' => false } end end end end end
Version data entries
45 entries across 45 versions & 1 rubygems