Sha256: 56876ca44cd4950627c55faae7836911a8d288e5acc8434a3eb92879389cab61
Contents?: true
Size: 1.24 KB
Versions: 3
Compression:
Stored size: 1.24 KB
Contents
module HashiCorp module VagrantVMwarefusion module Driver class Fusion def snapshot_take(name) vmrun("snapshot", "#{vmx_path}", name || "vagrant-snap-#{Time.now.to_i}") end def snapshot_delete(name) vmrun("deleteSnapshot", "#{vmx_path}", name) end def snapshot_rollback(bootmode, name) vmrun("revertToSnapshot", "#{vmx_path}", name || snapshot_list.last) start(bootmode) end def snapshot_list snapshots = [] vmrun("listSnapshots", "#{vmx_path}").stdout.split("\n").each do |line| if line !~ /Total snapshot/ snapshots << line end end snapshots end def has_snapshot?(name=nil) if name.nil? return true unless snapshot_list.empty? else return true if snapshot_list.include? "#{name}" end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems