class VagrantPlugins::ProviderLibvirt::Action::PruneNFSExports
Public Class Methods
new(app, _env)
click to toggle source
# File lib/vagrant-libvirt/action/prune_nfs_exports.rb, line 6 def initialize(app, _env) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/vagrant-libvirt/action/prune_nfs_exports.rb, line 10 def call(env) if env[:host] uuid = env[:machine].id # get all uuids uuids = env[:machine].provider.driver.connection.servers.all.map(&:id) # not exiisted in array will removed from nfs uuids.delete(uuid) env[:host].capability( :nfs_prune, env[:machine].ui, uuids ) end @app.call(env) end