Sha256: 0e35561b208ef3c8afb9276dee8199283f3cf72e569b825f42d92e85d487dd62
Contents?: true
Size: 927 Bytes
Versions: 2
Compression:
Stored size: 927 Bytes
Contents
module HashiCorp module VagrantVMwareworkstation module Driver class Base def snapshot_take vmrun("snapshot", "#{vmx_path}", "vagrant-snap-#{Time.now.to_i}") end def snapshot_rollback(bootmode) vmrun("revertToSnapshot", "#{vmx_path}", snapshot_list.last) start end def snapshot_list snapshots = [] vmrun("listSnapshots", "#{vmx_path}").stdout.split("\n").each do |line| if line =~ /^vagrant-snap-/ snapshots << line end end snapshots.sort end def has_snapshot? snapshot_list.length > 0 end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems