class HashiCorp::VagrantVMwareDesktop::Action::SnapshotRestore
This snapshots the VMware machine.
Public Class Methods
new(app, env)
click to toggle source
# File lib/vagrant-vmware-desktop/action/snapshot_restore.rb, line 10 def initialize(app, env) @app = app @logger = Log4r::Logger.new("hashicorp::provider::vmware::snapshot_restore") end
Public Instance Methods
call(env)
click to toggle source
# File lib/vagrant-vmware-desktop/action/snapshot_restore.rb, line 15 def call(env) env[:ui].info(I18n.t( "hashicorp.vagrant_vmware_desktop.snapshot_restoring", name: env[:snapshot_name])) env[:machine].provider.driver.snapshot_revert(env[:snapshot_name]) @app.call(env) end