Sha256: 2be8da1cf1e6aa3134784f23c64f863648b595061eae79438df9a842d9bb2af4

Contents?: true

Size: 630 Bytes

Versions: 10

Compression:

Stored size: 630 Bytes

Contents

module Vagrant
  class Action
    module VM
      class CheckAccessible
        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env["vm"] && env["vm"].created? && !env["vm"].vm.accessible?
            # The VM we are attempting to manipulate is inaccessible. This
            # is a very bad situation and can only be fixed by the user. It
            # also prohibits us from actually doing anything with the virtual
            # machine, so we raise an error.
            raise Errors::VMInaccessible
          end

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

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
vagrantup-0.8.9 lib/vagrant/action/vm/check_accessible.rb
vagrantup-0.8.8 lib/vagrant/action/vm/check_accessible.rb
vagrantup-0.8.7 lib/vagrant/action/vm/check_accessible.rb
vagrantup-0.8.6 lib/vagrant/action/vm/check_accessible.rb
vagrantup-0.8.10 lib/vagrant/action/vm/check_accessible.rb
vagrant-0.8.10 lib/vagrant/action/vm/check_accessible.rb
vagrant-0.8.8 lib/vagrant/action/vm/check_accessible.rb
vagrant-0.8.7 lib/vagrant/action/vm/check_accessible.rb
rvagrant-0.8.7.dev lib/vagrant/action/vm/check_accessible.rb
vagrant-0.8.6 lib/vagrant/action/vm/check_accessible.rb