Class: VagrantPlugins::VMM::Action::DeleteVM
- Inherits:
-
Object
- Object
- VagrantPlugins::VMM::Action::DeleteVM
- Defined in:
- lib/vagrant-vmm/action/delete_vm.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ DeleteVM
constructor
A new instance of DeleteVM.
Constructor Details
#initialize(app, env) ⇒ DeleteVM
5 6 7 |
# File 'lib/vagrant-vmm/action/delete_vm.rb', line 5 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vagrant-vmm/action/delete_vm.rb', line 9 def call(env) vmm_server_address = env[:machine].provider_config.vmm_server_address # generate options = { vmm_server_address: vmm_server_address, proxy_server_address: env[:machine].provider_config.proxy_server_address } env[:ui].info("Deleting the machine...") env[:machine].provider.driver.delete_vm() env[:machine].provider.reset_state env[:ui].info("Machine removed.") @app.call(env) end |