Class: VagrantPlugins::Utm::Action::PrepareNFSValidIds

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_utm/action/prepare_nfs_valid_ids.rb

Overview

This action prepares the NFS valid IDs for the VMs. The ids that are valid and should not be pruned by NFS

Instance Method Summary collapse

Constructor Details

#initialize(app, _env) ⇒ PrepareNFSValidIds

Returns a new instance of PrepareNFSValidIds.



12
13
14
15
# File 'lib/vagrant_utm/action/prepare_nfs_valid_ids.rb', line 12

def initialize(app, _env)
  @app = app
  @logger = Log4r::Logger.new("vagrant::action::vm::nfs")
end

Instance Method Details

#call(env) ⇒ Object



17
18
19
20
# File 'lib/vagrant_utm/action/prepare_nfs_valid_ids.rb', line 17

def call(env)
  env[:nfs_valid_ids] = env[:machine].provider.driver.read_vms.keys
  @app.call(env)
end