Sha256: 6e0d903cdf23afc23507a700da5c678cc93974859c82a7b98dd0871a04c184fa

Contents?: true

Size: 378 Bytes

Versions: 10

Compression:

Stored size: 378 Bytes

Contents

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

        def call(env)
          if env["vm"].vm.running?
            env.logger.info "Saving VM state and suspending execution..."
            env["vm"].vm.save_state
          end

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

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
vagrantup-0.5.4 lib/vagrant/action/vm/suspend.rb
vagrantup-0.5.3 lib/vagrant/action/vm/suspend.rb
vagrantup-0.5.2 lib/vagrant/action/vm/suspend.rb
vagrantup-0.5.1 lib/vagrant/action/vm/suspend.rb
vagrantup-0.5.0 lib/vagrant/action/vm/suspend.rb
vagrant-0.5.4 lib/vagrant/action/vm/suspend.rb
vagrant-0.5.3 lib/vagrant/action/vm/suspend.rb
vagrant-0.5.2 lib/vagrant/action/vm/suspend.rb
vagrant-0.5.1 lib/vagrant/action/vm/suspend.rb
vagrant-0.5.0 lib/vagrant/action/vm/suspend.rb