Sha256: bbc923746a2c1eb9a7338eedacfbda3283a6422bbf3472f325f0987204cde679

Contents?: true

Size: 897 Bytes

Versions: 15

Compression:

Stored size: 897 Bytes

Contents

require 'log4r'
require_relative "mixin_machine_index"

module VagrantPlugins
  module Skytap
    module Action
      # 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. https://github.com/mitchellh/vagrant/issues/6439
      class PrepareNFSValidIds
        include MixinMachineIndex

        def initialize(app, env)
          @app = app
          @env = env
          @logger = Log4r::Logger.new("vagrant_skytap::action::prepare_nfs_valid_ids")
        end

        def call(env)
          env[:nfs_valid_ids] = machine_index.collect{|entry| entry.extra_data['vm_id']}.compact
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vagrant-skytap-0.2.3 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.2.2 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.2.1 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.2.0 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.11 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.10 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.9 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.8 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.7 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.6 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.5 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.4 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.3 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.2 lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb
vagrant-skytap-0.1.1a lib/vagrant-skytap/action/prepare_nfs_valid_ids.rb