prune_nfs_exports: create Logger instance.

Fix #1110

Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@e-bulles.be>
This commit is contained in:
Philippe Vanhaesendonck 2020-05-12 08:33:39 +02:00
parent d75c9ffda3
commit 4472654ba0
No known key found for this signature in database
GPG Key ID: 6BC60C409B34E138

View File

@ -8,15 +8,16 @@ module VagrantPlugins
include VagrantPlugins::ProviderLibvirt::Util::Nfs
def initialize(app, _env)
@logger = Log4r::Logger.new('vagrant_libvirt::action::prune_nfs_exports')
@app = app
end
def call(env)
@machine = env[:machine]
@machine = env[:machine]
if using_nfs?
if using_nfs?
@logger.info('Using NFS, prunning NFS settings from host')
if env[:host]
if env[:host]
uuid = env[:machine].id
# get all uuids
uuids = env[:machine].provider.driver.connection.servers.all.map(&:id)