Class: HashiCorp::VagrantVMwareDesktop::Action::SnapshotSave
- Inherits:
-
Object
- Object
- HashiCorp::VagrantVMwareDesktop::Action::SnapshotSave
- Includes:
- Common
- Defined in:
- lib/vagrant-vmware-desktop/action/snapshot_save.rb
Overview
This snapshots the VMware machine.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ SnapshotSave
constructor
A new instance of SnapshotSave.
Methods included from Common
Constructor Details
#initialize(app, env) ⇒ SnapshotSave
Returns a new instance of SnapshotSave.
10 11 12 13 |
# File 'lib/vagrant-vmware-desktop/action/snapshot_save.rb', line 10 def initialize(app, env) @app = app @logger = Log4r::Logger.new("hashicorp::provider::vmware::snapshot_save") end |
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/vagrant-vmware-desktop/action/snapshot_save.rb', line 15 def call(env) env[:ui].info(I18n.t( "hashicorp.vagrant_vmware_desktop.snapshot_saving", name: env[:snapshot_name])) env[:machine].provider.driver.snapshot_take(env[:snapshot_name]) @app.call(env) end |