Class: VagrantPlugins::ProviderLibvirt::Action::RemoveLibvirtImage
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderLibvirt::Action::RemoveLibvirtImage
- Defined in:
- lib/vagrant-libvirt/action/remove_libvirt_image.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ RemoveLibvirtImage
constructor
A new instance of RemoveLibvirtImage.
Constructor Details
#initialize(app, _env) ⇒ RemoveLibvirtImage
Returns a new instance of RemoveLibvirtImage.
9 10 11 12 |
# File 'lib/vagrant-libvirt/action/remove_libvirt_image.rb', line 9 def initialize(app, _env) @logger = Log4r::Logger.new('vagrant_libvirt::action::remove_libvirt_image') @app = app end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/vagrant-libvirt/action/remove_libvirt_image.rb', line 14 def call(env) return @app.call(env) unless env[:box_removed].provider == :libvirt env[:ui].info("Vagrant-libvirt plugin removed box only from #{env[:env].boxes.directory} directory") env[:ui].info('From Libvirt storage pool you have to delete image manually(virsh, virt-manager or by any other tool)') @app.call(env) end |