class VagrantPlugins::ProviderLibvirt::Action::RemoveLibvirtImage

Public Class Methods

new(app, _env) click to toggle source
# File lib/vagrant-libvirt/action/remove_libvirt_image.rb, line 8
def initialize(app, _env)
  @logger = Log4r::Logger.new('vagrant_libvirt::action::remove_libvirt_image')
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/vagrant-libvirt/action/remove_libvirt_image.rb, line 13
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