Class: Vagrant::Action::VM::DestroyUnusedNetworkInterfaces
- Inherits:
-
Object
- Object
- Vagrant::Action::VM::DestroyUnusedNetworkInterfaces
- Defined in:
- lib/vagrant/action/vm/destroy_unused_network_interfaces.rb
Overview
Destroys the unused host only interfaces. This middleware cleans up any created host only networks.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ DestroyUnusedNetworkInterfaces
constructor
A new instance of DestroyUnusedNetworkInterfaces.
Constructor Details
#initialize(app, env) ⇒ DestroyUnusedNetworkInterfaces
Returns a new instance of DestroyUnusedNetworkInterfaces.
7 8 9 |
# File 'lib/vagrant/action/vm/destroy_unused_network_interfaces.rb', line 7 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/vagrant/action/vm/destroy_unused_network_interfaces.rb', line 11 def call(env) env[:vm].driver.delete_unused_host_only_networks # Continue along @app.call(env) end |