Class: VagrantPlugins::Utm::Action::SnapshotDelete
- Inherits:
-
Object
- Object
- VagrantPlugins::Utm::Action::SnapshotDelete
- Defined in:
- lib/vagrant_utm/action/snapshot_delete.rb
Overview
This action deletes a snapshot of the machine.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ SnapshotDelete
constructor
A new instance of SnapshotDelete.
Constructor Details
#initialize(app, _env) ⇒ SnapshotDelete
Returns a new instance of SnapshotDelete.
11 12 13 |
# File 'lib/vagrant_utm/action/snapshot_delete.rb', line 11 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vagrant_utm/action/snapshot_delete.rb', line 15 def call(env) env[:ui].info(I18n.t( "vagrant.actions.vm.snapshot.deleting", name: env[:snapshot_name] )) env[:machine].provider.driver.delete_snapshot( env[:machine].id, env[:snapshot_name] ) env[:ui].success(I18n.t( "vagrant.actions.vm.snapshot.deleted", name: env[:snapshot_name] )) @app.call(env) end |