Sha256: 2676a0e42c0a7d747c2787fca71f986b9931f80e99906298a7b4f090ded97de0

Contents?: true

Size: 535 Bytes

Versions: 1

Compression:

Stored size: 535 Bytes

Contents

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

        def call(env)
          if env[:machine].state.id == :not_created
            raise Vagrant::Errors::VMNotCreatedError
          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_created.rb