Class: VagrantPlugins::Skytap::Action::PrepareNFSValidIds
- Includes:
- MixinMachineIndex
- Defined in:
- lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
Overview
Creates a list of vm ids from all Skytap VMs in Vagrant’s global machine index. Any Vagrant machine not on this list will have its NFS entry pruned by the SyncedFolderCleanup action. NOTE: Unfortunately Vagrant providers have no way to know about each other’s machines, so there’s an impact on NFS mounts for machines from other providers. github.com/mitchellh/vagrant/issues/6439
Instance Attribute Summary
Attributes included from MixinMachineIndex
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ PrepareNFSValidIds
constructor
A new instance of PrepareNFSValidIds.
Methods included from MixinMachineIndex
#machine_index, #machine_index_entry
Constructor Details
#initialize(app, env) ⇒ PrepareNFSValidIds
Returns a new instance of PrepareNFSValidIds.
38 39 40 41 42 |
# File 'lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb', line 38 def initialize(app, env) @app = app @env = env @logger = Log4r::Logger.new("vagrant_skytap::action::prepare_nfs_valid_ids") end |
Instance Method Details
#call(env) ⇒ Object
44 45 46 47 |
# File 'lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb', line 44 def call(env) env[:nfs_valid_ids] = machine_index.collect{|entry| entry.extra_data['vm_id']}.compact @app.call(env) end |