Sha256: e2a81f5a32cd1da420406bf5da56fa5fa3380e9271fd8cf39c85649f1c61d9d6

Contents?: true

Size: 559 Bytes

Versions: 9

Compression:

Stored size: 559 Bytes

Contents

require 'yaml'
module VagrantPlugins
  module ProviderLibvirt
    module Action
      class PruneNFSExports

        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env[:host]
            uuid = env[:machine].id
            # get all uuids
            uuids = env[:libvirt_compute].servers.all.map(&:id)
            # not exiisted in array will removed from nfs
            uuids.delete(uuid)
            env[:host].nfs_prune(uuids)
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vagrant-libvirt-0.0.15 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.14 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.13 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.12 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.11 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.10 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.9 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.8 lib/vagrant-libvirt/action/prune_nfs_exports.rb
vagrant-libvirt-0.0.7 lib/vagrant-libvirt/action/prune_nfs_exports.rb