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