Sha256: e344bfe4ae63f873b7e156af17886929586ae79f54560d97e8911b952b32f2c1

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

module VagrantPlugins
  module ProviderVirtualBox
    module Action
      # This middleware checks that the VM is running, and raises an exception
      # if it is not, notifying the user that the VM must be running.
      class CheckRunning
        def initialize(app, env)
          @app = app
        end

        def call(env)
          if env[:machine].state.id != :running
            raise Vagrant::Errors::VMNotRunningError
          end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/providers/virtualbox/action/check_running.rb