Sha256: 04124cad0756c77610b4c1a6d165cbc78f2d039c91b3479f5129f2da9e121b44

Contents?: true

Size: 705 Bytes

Versions: 14

Compression:

Stored size: 705 Bytes

Contents

# frozen_string_literal: true

require 'log4r'

module VagrantPlugins
  module ProviderLibvirt
    module Action
      class RemoveLibvirtImage
        def initialize(app, _env)
          @logger = Log4r::Logger.new('vagrant_libvirt::action::remove_libvirt_image')
          @app = app
        end

        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
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vagrant-libvirt-0.12.2 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.12.1 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.12.0 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.11.2 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.11.1 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.8 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.7 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.6 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.5 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.4 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.3 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.2 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.1 lib/vagrant-libvirt/action/remove_libvirt_image.rb
vagrant-libvirt-0.10.0 lib/vagrant-libvirt/action/remove_libvirt_image.rb